1. 09 Feb, 2012 31 commits
    • Russell King's avatar
      ARM: sa11x0: neponset: don't static map neponset registers · fbae0f89
      Russell King authored
      Now that we ioremap() the neponset register space, there's no need
      to static map the neponset registers.  Get rid of this static mapping.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      fbae0f89
    • Russell King's avatar
      ARM: sa11x0: neponset: move register definitions to neponset.c · f942b0fd
      Russell King authored
      Move the board specific neponset register definitions to the board
      file, rather than mach/neponset.h.  However, as the NCR_0 register
      definitions are used by some drivers, leave these behind.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      f942b0fd
    • Russell King's avatar
      ARM: sa11x0: assabet/neponest: create neponset device in assabet.c · bab50a35
      Russell King authored
      The neponset board is a daughter board for the Assabet.  Create the
      neponset platform device in assabet.c, where we don't have to wrap
      it with machine_is_assabet() stuff.  We also create this device
      dynamically rather than keeping it as a static device.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      bab50a35
    • Russell King's avatar
      ARM: sa11x0: neponset: suspend/resume in _noirq state · 51f93390
      Russell King authored
      Suspend and resume in the _noirq state, so that we're saving the
      state of the modem control signals as late as possible, and restoring
      them as early as possible.  There's nothing to do in thaw/poweroff
      methods as we've already saved the necessary state.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      51f93390
    • Russell King's avatar
      ARM: sa11x0: neponset: place smc91x and sa1111 resources in neponset device · d2e539a5
      Russell King authored
      Complete the neponset device resources by covering the children's
      memory resources in the parent neponset device.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      d2e539a5
    • Russell King's avatar
      ARM: sa11x0: neponset: get parent IRQ from neponset device resource · b6bdfcf5
      Russell King authored
      Obtain the parent IRQ from the neponset device resource rather than
      hard-coding it into the code.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      b6bdfcf5
    • Russell King's avatar
      ARM: sa11x0: neponset: implement support for sparse IRQs · ced8d21c
      Russell King authored
      Implement the necessary allocation/freeing functionality to support
      sparse IRQs with the Neponset device.  On non-sparse IRQ platforms,
      this allows us to dynamically allocate from within the available IRQ
      number space.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ced8d21c
    • Russell King's avatar
      ARM: sa11x0: neponset: dynamically create neponset child devices · 9590e898
      Russell King authored
      Use platform_device_register_full() to dynamically create the various
      neponset child platform devices, and place them below the neponset
      device itself to ensure proper PM ordering and device structure.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      9590e898
    • Russell King's avatar
      ARM: sa11x0: neponset: save and restore MDM_CTL_0 · ae14c2e2
      Russell King authored
      Save and restore the modem output control register across a suspend/
      resume, as well as the NCR register.  Place these in a locally
      allocated data structure rather than needing a new static variable.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ae14c2e2
    • Russell King's avatar
      ARM: sa11x0: neponset: add driver .owner initializer · 398e58d0
      Russell King authored
      Ensure that the driver .owner field is properly initialized.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      398e58d0
    • Russell King's avatar
      ARM: sa11x0: neponset: shuffle some code around · 92e617d9
      Russell King authored
      Move the IRQ handler along side the rest of the IRQ code, and rearrange
      the include files.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      92e617d9
    • Russell King's avatar
      ARM: sa11x0: neponset: provide function to manipulate NCR_0 · 6ad1b614
      Russell King authored
      Rather than having direct register accesses to NCR_0 scattered amongst
      the code, provide a function instead.  This contains the necessary
      race protection for this platform, ensuring that updates to this
      register are safe.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      6ad1b614
    • Russell King's avatar
      ARM: sa11x0: neponset: fix interrupt setup · 71045520
      Russell King authored
      Since ARM was converted to genirq, the neponset IRQ implementation has
      gradually broken as a result of various subtle changes being introduced
      into genirq.
      
      It used to be that simple IRQs did not need an IRQ chip.  This is no
      longer the case, and genirq barfs in irq_set_handler().  Fix this by
      introducing a dummy no-op chip, and registering it along with the flow
      handler.
      
      Neponset IRQs really don't have any masking ability - all we have is a
      status register to allow us to decode the source, and a three input OR
      gate inside a CPLD.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      71045520
    • Russell King's avatar
      ARM: sa11x0: assabet: ensure that GPIO27 is driven · 49e01e3f
      Russell King authored
      GPIO27 is just connected to a CPLD input without any pull-ups or pull-
      downs.  If GPIO27 is left as an input, it will float around mid-supply,
      which for CMOS inputs is the worst place for a pin to be.  Ensure that
      this pin is driven.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      49e01e3f
    • Russell King's avatar
      ARM: sa11x0: assabet: avoid glitching GPIOs when setting outputs · 4f592e6d
      Russell King authored
      Avoid glitching the GPIO signals during initialization, which can
      have undesirable effects.  Ensure that the desired pin state is set
      before we change the GPIO pin direction to be an output.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      4f592e6d
    • Russell King's avatar
    • Russell King's avatar
      ARM: sa11x0: convert to use DEFINE_RES_xxx macros · a181099e
      Russell King authored
      Convert StrongARM-11x0 platforms and core SoC code to use the
      DEFINE_RES_xxx macros.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      a181099e
    • Russell King's avatar
      ARM: sa11x0: fix section mismatch warnings · 80ea2065
      Russell King authored
      Neponset calls sa1110_mb_disable() from __devinit code, but
      sa1110_mb_disable() is marked __init, and so causes a section
      mismatch warning.
      
      As sa1110_mb_enable() and sa1110_mb_disable() need to be callable
      from suspend/resume paths as well, they must not be marked __init
      or __devinit.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      80ea2065
    • Russell King's avatar
      ARM: sa11x0: fix sleep entry · f3bb3d74
      Russell King authored
      Sometimes, we get stuck while trying to enter sleep.  This seems
      to occur if we do not have udelay() in the instruction cache. Avoid
      this by requesting a short delay prior to modifying the SDRAM timings.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      f3bb3d74
    • Russell King's avatar
      ARM: sa11x0: fix off-by-one resource sizes · cb5e2399
      Russell King authored
      Hackkit defined its flash memory resource to be 32M + 1 byte.
      Jornada defined the Epson video controller resources to be one byte
      larger than they should be, and mis-mapped the SA-1111 companion
      chip one byte smaller than it should be.
      
      Fix these.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      cb5e2399
    • Linus Torvalds's avatar
      Linux 3.3-rc3 · d65b4e98
      Linus Torvalds authored
      d65b4e98
    • Linus Torvalds's avatar
      Merge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 63082402
      Linus Torvalds authored
      One patch fixes an bug in the ARM/MSM IOMMU code which returned sucess
      in the unmap function even when an error occured and the other patch
      adds a workaround into the AMD IOMMU driver to better handle broken IVRS
      ACPI tables (this patch fixes the case when a device is not listed in
      the table but actually translated by the iommu).
      
      * 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/msm: Fix error handling in msm_iommu_unmap()
        iommu/amd: Work around broken IVRS tables
      63082402
    • Linus Torvalds's avatar
      Merge branch '3.3-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 19e75ed4
      Linus Torvalds authored
      This series contains pending target bug-fixes and cleanups for v3.3-rc3
      that have been addressed the past weeks in lio-core.git.
      
      Some of the highlights include:
      
       - Fix handling for control CDBs with data greater than PAGE_SIZE (andy)
       - Use IP_FREEBIND for iscsi-target to address network portal creation
         issues with systemd (dax)
       - Allow PERSISTENT RESERVE IN for non-reservation holder (marco)
       - Fix iblock se_dev_attrib.unmap_granularity (marco)
       - Fix unsupported WRITE_SAME sense payload handling (martin)
       - Add workaround for zero-length control CDB handling (nab)
       - Fix discovery with INADDR_ANY and IN6ADDR_ANY_INIT (nab)
       - Fix target_submit_cmd() exception handling (nab)
       - Return correct ASC for unimplemented VPD pages (roland)
       - Don't zero pages used for data buffers (roland)
       - Fix return code of core_tpg_.*_lun (sebastian)
      
      * '3.3-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits)
        target: Fix unsupported WRITE_SAME sense payload
        iscsi: use IP_FREEBIND socket option
        iblock: fix handling of large requests
        target: handle empty string writes in sysfs
        iscsi_target: in_aton needs linux/inet.h
        target: Fix iblock se_dev_attrib.unmap_granularity
        target: Fix target_submit_cmd() exception handling
        target: Change target_submit_cmd() to return void
        target: accept REQUEST_SENSE with 18bytes
        target: Fail INQUIRY commands with EVPD==0 but PAGE CODE!=0
        target: Return correct ASC for unimplemented VPD pages
        iscsi-target: Fix discovery with INADDR_ANY and IN6ADDR_ANY_INIT
        target: Allow control CDBs with data > 1 page
        iscsi-target: Fix up a few assignments
        iscsi-target: make one-bit bitfields unsigned
        iscsi-target: Fix double list_add with iscsit_alloc_buffs reject
        iscsi-target: Fix reject release handling in iscsit_free_cmd()
        target: fix return code of core_tpg_.*_lun
        target: use save/restore lock primitive in core_dec_lacl_count()
        target: avoid multiple outputs in scsi_dump_inquiry()
        ...
      19e75ed4
    • Linus Torvalds's avatar
      Merge tag 'md-3.3-fixes' of git://neil.brown.name/md · 4d39aa1b
      Linus Torvalds authored
      Some simple md-related fixes.
      
      1/ two small fixes to ensure we handle an interrupted resync properly.
      2/ avoid loading the bitmap multiple times in dm-raid
      
      * tag 'md-3.3-fixes' of git://neil.brown.name/md:
        md: two small fixes to handling interrupt resync.
        Prevent DM RAID from loading bitmap twice.
      4d39aa1b
    • Linus Torvalds's avatar
      Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6 · 4a68d54c
      Linus Torvalds authored
      SPI bug fixes for v3.3-rc2
      
      Minor SPI device driver changes.  A rename of the pch_spi_pcidev symbol
      that merely eliminates a modpost warning, and a Kconfig change to allow
      the Samsung spi driver to build on EXYNOS.
      
      * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
        spi-topcliff-pch: rename pch_spi_pcidev to pch_spi_pcidev_driver
        spi: Add spi-s3c64xx driver dependency on ARCH_EXYNOS4
      4a68d54c
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's tree) · 15a46353
      Linus Torvalds authored
      Five fixes
      
      * branch 'akpm':
        pcmcia: fix socket refcount decrementing on each resume
        mm: fix UP THP spin_is_locked BUGs
        drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax
        mm: compaction: check for overlapping nodes during isolation for migration
        nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments()
      15a46353
    • Russell King's avatar
      pcmcia: fix socket refcount decrementing on each resume · 025e4ab3
      Russell King authored
      This fixes a memory-corrupting bug: not only does it cause the warning,
      but as a result of dropping the refcount to zero, it causes the
      pcmcia_socket0 device structure to be freed while it still has
      references, causing slab caches corruption.  A fatal oops quickly
      follows this warning - often even just a 'dmesg' following the warning
      causes the kernel to oops.
      
      While testing suspend/resume on an ARM device with PCMCIA support, and a
      CF card inserted, I found that after five suspend and resumes, the
      kernel would complain, and shortly die after with slab corruption.
      
        WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50()
      
      As the message doesn't give a clue about which kobject, and the built-in
      debugging in drivers/base/power/main.c happens too late, this was added
      right before each get_device():
      
        printk("%s: %p [%s] %u\n", __func__, dev, kobject_name(&dev->kobj), atomic_read(&dev->kobj.kref.refcount));
      
      and on the 3rd s2ram cycle, the following behaviour observed:
      
      On the 3rd suspend/resume cycle:
      
        dpm_prepare: c1a0d998 [pcmcia_socket0] 3
        dpm_suspend: c1a0d998 [pcmcia_socket0] 3
        dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 3
        dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 3
        dpm_resume: c1a0d998 [pcmcia_socket0] 3
        dpm_complete: c1a0d998 [pcmcia_socket0] 2
      
      4th:
      
        dpm_prepare: c1a0d998 [pcmcia_socket0] 2
        dpm_suspend: c1a0d998 [pcmcia_socket0] 2
        dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 2
        dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 2
        dpm_resume: c1a0d998 [pcmcia_socket0] 2
        dpm_complete: c1a0d998 [pcmcia_socket0] 1
      
      5th:
      
        dpm_prepare: c1a0d998 [pcmcia_socket0] 1
        dpm_suspend: c1a0d998 [pcmcia_socket0] 1
        dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 1
        dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 1
        dpm_resume: c1a0d998 [pcmcia_socket0] 1
        dpm_complete: c1a0d998 [pcmcia_socket0] 0
        ------------[ cut here ]------------
        WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50()
        Modules linked in: ucb1x00_core
        Backtrace:
        [<c0212090>] (dump_backtrace+0x0/0x110) from [<c04799dc>] (dump_stack+0x18/0x1c)
        [<c04799c4>] (dump_stack+0x0/0x1c) from [<c021cba0>] (warn_slowpath_common+0x50/0x68)
        [<c021cb50>] (warn_slowpath_common+0x0/0x68) from [<c021cbdc>] (warn_slowpath_null+0x24/0x28)
        [<c021cbb8>] (warn_slowpath_null+0x0/0x28) from [<c0335374>] (kobject_get+0x28/0x50)
        [<c033534c>] (kobject_get+0x0/0x50) from [<c03804f4>] (get_device+0x1c/0x24)
        [<c0388c90>] (dpm_complete+0x0/0x1a0) from [<c0389cc0>] (dpm_resume_end+0x1c/0x20)
        ...
      
      Looking at commit 7b24e798 ("pcmcia: split up central event handler"),
      the following change was made to cs.c:
      
                      return 0;
              }
       #endif
      -
      -       send_event(skt, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
      +       if (!(skt->state & SOCKET_CARDBUS) && (skt->callback))
      +               skt->callback->early_resume(skt);
              return 0;
       }
      
      And the corresponding change in ds.c is from:
      
      -static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
      -{
      -       struct pcmcia_socket *s = pcmcia_get_socket(skt);
      ...
      -       switch (event) {
      ...
      -       case CS_EVENT_PM_RESUME:
      -               if (verify_cis_cache(skt) != 0) {
      -                       dev_dbg(&skt->dev, "cis mismatch - different card\n");
      -                       /* first, remove the card */
      -                       ds_event(skt, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH);
      -                       mutex_lock(&s->ops_mutex);
      -                       destroy_cis_cache(skt);
      -                       kfree(skt->fake_cis);
      -                       skt->fake_cis = NULL;
      -                       s->functions = 0;
      -                       mutex_unlock(&s->ops_mutex);
      -                       /* now, add the new card */
      -                       ds_event(skt, CS_EVENT_CARD_INSERTION,
      -                                CS_EVENT_PRI_LOW);
      -               }
      -               break;
      ...
      -    }
      
      -    pcmcia_put_socket(s);
      
      -    return 0;
      -} /* ds_event */
      
      to:
      
      +static int pcmcia_bus_early_resume(struct pcmcia_socket *skt)
      +{
      +       if (!verify_cis_cache(skt)) {
      +               pcmcia_put_socket(skt);
      +               return 0;
      +       }
      
      +       dev_dbg(&skt->dev, "cis mismatch - different card\n");
      
      +       /* first, remove the card */
      +       pcmcia_bus_remove(skt);
      +       mutex_lock(&skt->ops_mutex);
      +       destroy_cis_cache(skt);
      +       kfree(skt->fake_cis);
      +       skt->fake_cis = NULL;
      +       skt->functions = 0;
      +       mutex_unlock(&skt->ops_mutex);
      
      +       /* now, add the new card */
      +       pcmcia_bus_add(skt);
      +       return 0;
      +}
      
      As can be seen, the original function called pcmcia_get_socket() and
      pcmcia_put_socket() around the guts, whereas the replacement code
      calls pcmcia_put_socket() only in one path.  This creates an imbalance
      in the refcounting.
      
      Testing with pcmcia_put_socket() put removed shows that the bug is gone:
      
        dpm_suspend: c1a10998 [pcmcia_socket0] 5
        dpm_suspend_noirq: c1a10998 [pcmcia_socket0] 5
        dpm_resume_noirq: c1a10998 [pcmcia_socket0] 5
        dpm_resume: c1a10998 [pcmcia_socket0] 5
        dpm_complete: c1a10998 [pcmcia_socket0] 5
      Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      025e4ab3
    • Hugh Dickins's avatar
      mm: fix UP THP spin_is_locked BUGs · b9980cdc
      Hugh Dickins authored
      Fix CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_SMP=n CONFIG_DEBUG_VM=y
      CONFIG_DEBUG_SPINLOCK=n kernel: spin_is_locked() is then always false,
      and so triggers some BUGs in Transparent HugePage codepaths.
      
      asm-generic/bug.h mentions this problem, and provides a WARN_ON_SMP(x);
      but being too lazy to add VM_BUG_ON_SMP, BUG_ON_SMP, WARN_ON_SMP_ONCE,
      VM_WARN_ON_SMP_ONCE, just test NR_CPUS != 1 in the existing VM_BUG_ONs.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b9980cdc
    • Axel Lin's avatar
      drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax · ec44fd42
      Axel Lin authored
      In current code, pltfm->als_vmin is set to LM3530_ALS_WINDOW_mV and
      pltfm->als_vmax is 0.  This does not make sense.  I think what we want
      here is setting pltfm->als_vmax to LM3530_ALS_WINDOW_mV.
      
      Both als_vmin and als_vmax local variables will be set to
      pltfm->als_vmin and pltfm->als_vmax by a few lines latter.  Thus also
      remove a redundant assignment for als_vmin and als_vmax in this patch.
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
      Acked-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
      Tested-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ec44fd42
    • Mel Gorman's avatar
      mm: compaction: check for overlapping nodes during isolation for migration · dc908600
      Mel Gorman authored
      When isolating pages for migration, migration starts at the start of a
      zone while the free scanner starts at the end of the zone.  Migration
      avoids entering a new zone by never going beyond the free scanned.
      
      Unfortunately, in very rare cases nodes can overlap.  When this happens,
      migration isolates pages without the LRU lock held, corrupting lists
      which will trigger errors in reclaim or during page free such as in the
      following oops
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
        IP: [<ffffffff810f795c>] free_pcppages_bulk+0xcc/0x450
        PGD 1dda554067 PUD 1e1cb58067 PMD 0
        Oops: 0000 [#1] SMP
        CPU 37
        Pid: 17088, comm: memcg_process_s Tainted: G            X
        RIP: free_pcppages_bulk+0xcc/0x450
        Process memcg_process_s (pid: 17088, threadinfo ffff881c2926e000, task ffff881c2926c0c0)
        Call Trace:
          free_hot_cold_page+0x17e/0x1f0
          __pagevec_free+0x90/0xb0
          release_pages+0x22a/0x260
          pagevec_lru_move_fn+0xf3/0x110
          putback_lru_page+0x66/0xe0
          unmap_and_move+0x156/0x180
          migrate_pages+0x9e/0x1b0
          compact_zone+0x1f3/0x2f0
          compact_zone_order+0xa2/0xe0
          try_to_compact_pages+0xdf/0x110
          __alloc_pages_direct_compact+0xee/0x1c0
          __alloc_pages_slowpath+0x370/0x830
          __alloc_pages_nodemask+0x1b1/0x1c0
          alloc_pages_vma+0x9b/0x160
          do_huge_pmd_anonymous_page+0x160/0x270
          do_page_fault+0x207/0x4c0
          page_fault+0x25/0x30
      
      The "X" in the taint flag means that external modules were loaded but but
      is unrelated to the bug triggering.  The real problem was because the PFN
      layout looks like this
      
        Zone PFN ranges:
          DMA      0x00000010 -> 0x00001000
          DMA32    0x00001000 -> 0x00100000
          Normal   0x00100000 -> 0x01e80000
        Movable zone start PFN for each node
        early_node_map[14] active PFN ranges
            0: 0x00000010 -> 0x0000009b
            0: 0x00000100 -> 0x0007a1ec
            0: 0x0007a354 -> 0x0007a379
            0: 0x0007f7ff -> 0x0007f800
            0: 0x00100000 -> 0x00680000
            1: 0x00680000 -> 0x00e80000
            0: 0x00e80000 -> 0x01080000
            1: 0x01080000 -> 0x01280000
            0: 0x01280000 -> 0x01480000
            1: 0x01480000 -> 0x01680000
            0: 0x01680000 -> 0x01880000
            1: 0x01880000 -> 0x01a80000
            0: 0x01a80000 -> 0x01c80000
            1: 0x01c80000 -> 0x01e80000
      
      The fix is straight-forward.  isolate_migratepages() has to make a
      similar check to isolate_freepage to ensure that it never isolates pages
      from a zone it does not hold the LRU lock for.
      
      This was discovered in a 3.0-based kernel but it affects 3.1.x, 3.2.x
      and current mainline.
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dc908600
    • Xi Wang's avatar
      nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments() · 1ecd3c7e
      Xi Wang authored
      nsegs is read from userspace.  Limit its value and avoid overflowing nsegs
      * sizeof(__u64) in the subsequent call to memdup_user().
      
      This patch complements 481fe17e ("nilfs2: potential integer overflow
      in nilfs_ioctl_clean_segments()").
      Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
      Cc: Haogang Chen <haogangchen@gmail.com>
      Acked-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1ecd3c7e
  2. 08 Feb, 2012 6 commits
  3. 07 Feb, 2012 3 commits
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6 · 98e96852
      Linus Torvalds authored
      fbdev fixes for 3.3
      
      It includes:
       - compile fix for fsl-diu-fb
       - fix for a suspend/resume issue in atmel_lcdfb
       - fix for a suspend/resume issue in OMAP
       - workaround for a hardware bug to avoid physical damage in OMAP
       - really trivial dead code removal in intelfb
      
      * tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6:
        atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
        intelfb: remove some dead code
        drivers/video: compile fixes for fsl-diu-fb.c
        OMAPDSS: HDMI: PHY burnout fix
        OMAP: 4430SDP/Panda: add HDMI HPD gpio
        OMAP: 4430SDP/Panda: setup HDMI GPIO muxes
        OMAPDSS: remove wrong HDMI HPD muxing
        OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD
        OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios
        OMAPDSS: use sync versions of pm_runtime_put
      98e96852
    • Joe Perches's avatar
      checkpatch: Warn on code with 6+ tab indentation · 8eef05dd
      Joe Perches authored
      Overly indented code should be refactored.
      
      Suggest refactoring excessive indentation of of
      if/else/for/do/while/switch statements.
      
      For example:
      
      $ cat t.c
      #include <stdio.h>
      #include <stdlib.h>
      
      int main(int argc, char **argv)
      {
      
      	if (1)
      		if (2)
      			if (3)
      				if (4)
      					if (5)
      						if (6)
      							if (7)
      								if (8)
      									;
      	return 0;
      }
      
      $ ./scripts/checkpatch.pl -f t.c
      WARNING: Too many leading tabs - consider code refactoring
      #12: FILE: t.c:12:
      +						if (6)
      
      WARNING: Too many leading tabs - consider code refactoring
      #13: FILE: t.c:13:
      +							if (7)
      
      WARNING: Too many leading tabs - consider code refactoring
      #14: FILE: t.c:14:
      +								if (8)
      
      total: 0 errors, 3 warnings, 17 lines checked
      
      t.c has style problems, please review.
      
      If any of these errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8eef05dd
    • Linus Torvalds's avatar
      Merge tag 'ib-srpt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · 6bd113f1
      Linus Torvalds authored
      Cleanups and error path fixes for the new SRP (SCSI RDMA protocol) target.
      
      * tag 'ib-srpt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IB/srpt: Don't return freed pointer from srpt_alloc_ioctx_ring()
        IB/srpt: Fix ERR_PTR() vs. NULL checking confusion
        IB/srpt: Remove unneeded <linux/version.h> include
        IB/srpt: Use ARRAY_SIZE() instead of open-coding
        IB/srpt: Use DEFINE_SPINLOCK()/LIST_HEAD()
      6bd113f1