1. 10 2月, 2012 5 次提交
    • L
      Merge tag 'staging-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · b05ee6bf
      Linus Torvalds 提交于
      Staging tree patches for 3.3-rc3
      
      Big things here is the deletion of the Android pmem driver, as it's
      obsolete and no one uses it, the gma500 driver as it's already in the
      drm portion of the kernel tree, and the pohmelfs filesystem as it's
      obsolete and a rewritten version is being proposed for the fs/ section
      of the kernel.
      
      Other than that, a smattering of different bugfixes and regressions, and
      some omap drm api merge fixups that were needed due to api changes in
      the main portion of the drm tree, allowing this code to build properly
      again.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'staging-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits)
        staging: pohmelfs: remove drivers/staging/pohmelfs
        staging: android/ram_console: Don't build on arches w/o ioremap
        staging: r8712u: Use asynchronous firmware loading
        staging: usbip: fix to prevent potentially using uninitialized spinlock
        staging: r8712u: Fix problem when CONFIG_R8712_AP is set
        staging: tidspbridge: fix incorrect free to drv_datap
        staging: tidspbridge: fix bridge_open memory leaks
        staging: android: lowmemorykiller: Don't wait more than one second for a process to die
        MAINTAINERS: staging: iio: add iio information
        staging: zcache: fix serialization bug in zv stats
        staging: fix go7007-usb license
        Staging: android: binder: Fix crashes when sharing a binder file between processes
        Staging: android: Remove pmem driver
        Staging: asus_oled: fix NULL-ptr crash on unloading
        Staging: asus_oled: fix image processing
        Staging: android: binder: Don't call dump_stack in binder_vma_open
        staging: r8712u: Add new Sitecom UsB ID
        zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.
        zcache: fix deadlock condition
        staging: drm/omap: fix locking issue
        ...
      b05ee6bf
    • L
      Merge tag 'driver-core-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · b0286db4
      Linus Torvalds 提交于
      Driver core fixes for the 3.3-rc3 tree.
      
      A few fixes for kobject warnings that have popped up in the cpu hotplug path,
      and a regression fix for the speed of the hotplug memory code.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'driver-core-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        driver-core: cpu: fix kobject warning when hotplugging a cpu
        ACPI: remove duplicated lines of merging problems with acpi_processor_add
        docbook: fix fatal errors in device-drivers docbook and add DMA Management section
        drivers/base/memory.c: fix memory_dev_init() long delay
        driver core: cpu: remove kernel warning when removing a cpu
      b0286db4
    • L
      Merge tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · ae5cdd40
      Linus Torvalds 提交于
      Minor char-misc fixes for 3.3-rc3
      
      Nothing big here, some Kconfig fixes for the MISC_DEVICES config option
      that was being used incorrectly, and some other minor bug fixes.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'char-misc-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip
        cs5535-mfgpt: don't call __init function from __devinit
        vmw_balloon: fix for a -Wuninitialized warning
        drivers: misc: Remove MISC_DEVICES config option
        c2port: fix build error for duramar2150 due to missing header.
      ae5cdd40
    • L
      Merge tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fe250923
      Linus Torvalds 提交于
      USB fixes for 3.3-rc3
      
      Here are a few minor USB fixes and a bunch of device id updates for the
      USB drivers.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: usbserial: add new PID number (0xa951) to the ftdi driver
        usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
        usb: musb: fix a build error on mips
        uwb & wusb & usb wireless controllers: fix kconfig error & build errors
        usb: Skip PCI USB quirk handling for Netlogic XLP
        powerpc/usb: fix issue of CPU halt when missing USB PHY clock
        usb: otg: mv_otg: Add dependence
        usb: host: Distinguish Kconfig text for Freescale controllers
        USB: add new zte 3g-dongle's pid to option.c
        usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
        USB: qcserial: don't enable autosuspend
        USB: qcserial: add several new serial devices
        usb: otg: mv_otg: Add dependence
        usb: gadget: zero: fix bug in loopback autoresume handling
      fe250923
    • D
      Reduce the number of expensive division instructions done by _parse_integer() · 690d137f
      David Howells 提交于
      _parse_integer() does one or two division instructions (which are slow)
      per digit parsed to perform the overflow check.
      
      Furthermore, these are particularly expensive examples of division
      instruction as the number of clock cycles required to complete them may
      go up with the position of the most significant set bit in the dividend:
      
      	if (*res > div_u64(ULLONG_MAX - val, base))
      
      which is as maximal as possible.
      
      Worse, on 32-bit arches, more than one of these division instructions
      may be required per digit.
      
      So, assuming we don't support a base of more than 16, skip the check if the
      top nibble of the result is not set at this point.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      [ Changed it to not dereference the pointer all the time - even if the
        compiler can and does optimize it away, the code just looks cleaner.
        And edited the top nybble test slightly to make the code generated on
        x86-64 better in the loop - test against a hoisted constant instead of
        shifting and testing the result ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      690d137f
  2. 09 2月, 2012 35 次提交
    • L
      Linux 3.3-rc3 · d65b4e98
      Linus Torvalds 提交于
      d65b4e98
    • L
      Merge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 63082402
      Linus Torvalds 提交于
      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
    • L
      Merge branch '3.3-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 19e75ed4
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'md-3.3-fixes' of git://neil.brown.name/md · 4d39aa1b
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6 · 4a68d54c
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'akpm' (Andrew's tree) · 15a46353
      Linus Torvalds 提交于
      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
    • R
      pcmcia: fix socket refcount decrementing on each resume · 025e4ab3
      Russell King 提交于
      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: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      025e4ab3
    • H
      mm: fix UP THP spin_is_locked BUGs · b9980cdc
      Hugh Dickins 提交于
      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: NHugh Dickins <hughd@google.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b9980cdc
    • A
      drivers/leds/leds-lm3530.c: fix setting pltfm->als_vmax · ec44fd42
      Axel Lin 提交于
      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: NAxel Lin <axel.lin@gmail.com>
      Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
      Acked-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Tested-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec44fd42
    • M
      mm: compaction: check for overlapping nodes during isolation for migration · dc908600
      Mel Gorman 提交于
      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: NMel Gorman <mgorman@suse.de>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dc908600
    • X
      nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments() · 1ecd3c7e
      Xi Wang 提交于
      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: NXi Wang <xi.wang@gmail.com>
      Cc: Haogang Chen <haogangchen@gmail.com>
      Acked-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1ecd3c7e
    • E
      staging: pohmelfs: remove drivers/staging/pohmelfs · 67435319
      Evgeniy Polyakov 提交于
      New pohmelfs is coming, and it is time to remove deadly old design
      https://lkml.org/lkml/2012/2/8/293Signed-off-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67435319
    • G
      driver-core: cpu: fix kobject warning when hotplugging a cpu · 29bb5d4f
      Greg Kroah-Hartman 提交于
      Due to the sysdev conversion to struct device, the cpu objects get
      reused when adding a cpu after offlining it, which causes a big warning
      that the kobject portion is not properly initialized.
      
      So clear out the object before we register it again, so all is quiet.
      Reported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      29bb5d4f
    • Y
      ACPI: remove duplicated lines of merging problems with acpi_processor_add · 15f51136
      Yinghai Lu 提交于
      Those lines have two copies.
      
      Not sure how it could happen, looks like git problem.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Thomas Renninger <trenn@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      15f51136
    • L
      Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · e862f2e4
      Linus Torvalds 提交于
      sound fixes #2 for 3.3-rc3
      
      A collection of small fixes, mostly for regressions.
      In addition, a few ASoC wm8994 updates are included, too.
      
      * tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm8994: Disable line output discharge prior to ramping VMID
        ASoC: wm8994: Fix typo in VMID ramp setting
        ALSA: oxygen, virtuoso: fix exchanged L/R volumes of aux and CD inputs
        ALSA: usb-audio: add Edirol UM-3G support
        ALSA: hda - add support for Uniwill ECS M31EI notebook
        ALSA: hda - Fix error handling in patch_ca0132.c
        ASoC: wm8994: Enabling VMID should take a runtime PM reference
        ALSA: hda/realtek - Fix a wrong condition
        ALSA: emu8000: Remove duplicate linux/moduleparam.h include from emu8000_patch.c
        ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slaves
        ASoC: wm_hubs: Correct line input to line output 2 paths
        ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
        ASoC: wm8962: Fix word length configuration
        ASoC: core: Better support for idle_bias_off suspend ignores
        ASoC: wm8994: Remove ASoC level register cache sync
        ASoC: wm_hubs: Fix routing of input PGAs to line output mixer
      e862f2e4
    • A
      staging: android/ram_console: Don't build on arches w/o ioremap · 203209ef
      Anton Vorontsov 提交于
      This patch fixes UML build:
      
          CC      drivers/staging/android/ram_console.o
        drivers/staging/android/ram_console.c: In function
        'ram_console_driver_probe':
        drivers/staging/android/ram_console.c:358:2: error: implicit declaration
        of function 'ioremap' [-Werror=implicit-function-declaration]
        cc1: some warnings being treated as errors
        make[3]: *** [drivers/staging/android/ram_console.o] Error 1
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      203209ef
    • L
      staging: r8712u: Use asynchronous firmware loading · 8c213fa5
      Larry Finger 提交于
      In https://bugs.archlinux.org/task/27996, failure of driver r8712u is
      reported, with a timeout during module loading due to synchronous loading
      of the firmware. The code now uses request_firmware_nowait().
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c213fa5
    • B
      staging: usbip: fix to prevent potentially using uninitialized spinlock · 737912e1
      Bart Westgeest 提交于
      The stub_probe function can be called as soon as the stub_driver is
      registered. This can lead to the busid_table_lock being used before it
      is initialized. Moved calling the init_busid_table function (which
      initalizes this spinlock) to be called earlier in the init function to
      prevent this from happening.
      Signed-off-by: NBart Westgeest <bart@elbrys.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      737912e1
    • L
      staging: r8712u: Fix problem when CONFIG_R8712_AP is set · 4c0029f0
      Larry Finger 提交于
      When this driver was upgraded to the vendor 20100831 version in
      commit 93c55dda et al,, one listhead initialization was missed.
      This broke complete operation of the driver whenever AP mode was
      enabled.
      
      This patch fixes https://bugs.archlinux.org/task/27996.
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stable <stable@vger.stable.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c0029f0
    • O
      staging: tidspbridge: fix incorrect free to drv_datap · 44c54350
      Omar Ramirez Luna 提交于
      This structure is still used after it has been freed, since it
      is being allocated in probe, calls to free it have been moved to
      module's remove routine.
      
      This should fix the follwoing messages when attempting to remove the
      module:
       drv_get_first_dev_extension: Failed to retrieve the object handle
       drv_get_first_dev_extension: Failed to retrieve the object handle
       drv_destroy: Failed to store DRV object
       mgr_destroy: Failed to store MGR object
      Signed-off-by: NOmar Ramirez Luna <omar.ramirez@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      44c54350
    • O
      staging: tidspbridge: fix bridge_open memory leaks · 5a63177a
      Omar Ramirez Luna 提交于
      There are two members of pr_ctxt allocated during bridge_open that
      are never freed resulting in memory leaks, these are stream_id and
      node_id, they are now freed on release of the handle (bridge_release)
      right before freeing pr_ctxt.
      
      Error path for bridge_open was also fixed since the same variables
      could result in memory leaking due to missing handling of failure
      scenarios. While at it, the indentation changes were introduced to
      avoid interleaved goto statements inside big if blocks.
      Signed-off-by: NOmar Ramirez Luna <omar.ramirez@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5a63177a
    • A
      staging: android: lowmemorykiller: Don't wait more than one second for a process to die · e5d7965f
      Arve Hjønnevåg 提交于
      If a process forked and the child process was killed by the
      lowmemorykiller, the lowmemory killer would be disabled until
      the parent process reaped the child or it died itself.
      Signed-off-by: NArve Hjønnevåg <arve@android.com>
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e5d7965f
    • A
    • S
      staging: zcache: fix serialization bug in zv stats · 2a483011
      Seth Jennings 提交于
      In a multithreaded workload, the zv_curr_dist_counts
      and zv_cumul_dist_counts statistics are being corrupted
      because the increments and decrements in zv_create
      and zv_free are not atomic.
      
      This patch converts these statistics and their corresponding
      increments/decrements/reads to atomic operations.
      Signed-off-by: NSeth Jennings <sjenning@linux.vnet.ibm.com>
      Acked-by: NDan Magenheimer <dan.magenheimer@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2a483011
    • R
      staging: fix go7007-usb license · a9d3c9e3
      Randy Dunlap 提交于
      Add MODULE_LICENSE() for this source module to fix build warning:
      
      WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/media/go7007/go7007-usb.o
      see include/linux/module.h for more information
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Ross Cohen <rcohen@snurgle.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9d3c9e3
    • A
      Staging: android: binder: Fix crashes when sharing a binder file between processes · bd1eff97
      Arve Hjønnevåg 提交于
      Opening the binder driver and sharing the file returned with
      other processes (e.g. by calling fork) can crash the kernel.
      Prevent these crashes with the following changes:
      - Add a mutex to protect against two processes mmapping the
        same binder_proc.
      - After locking mmap_sem, check that the vma we want to access
        (still) points to the same mm_struct.
      - Use proc->tsk instead of current to get the files struct since
        this is where we get the rlimit from.
      Signed-off-by: NArve Hjønnevåg <arve@android.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bd1eff97
    • S
      Staging: android: Remove pmem driver · b0d017e8
      Shuah Khan 提交于
      Addroid pmem driver is no longer used in any of the Android products.
      This patch removes pmem driver from Android staging area
      
      Reference: https://lkml.org/lkml/2012/1/23/183Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b0d017e8
    • P
      Staging: asus_oled: fix NULL-ptr crash on unloading · 3589e745
      Pekka Paalanen 提交于
      Asus_oled triggers the following bug on module unloading:
      
       usbcore: deregistering interface driver asus-oled
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
       IP: [<ffffffff8111292b>] sysfs_delete_link+0x30/0x66
      
       Call Trace:
        [<ffffffff81225373>] device_remove_class_symlinks+0x6b/0x70
        [<ffffffff812256a8>] device_del+0x9f/0x1ab
        [<ffffffff812257c5>] device_unregister+0x11/0x1e
        [<ffffffffa000cb82>] asus_oled_disconnect+0x4f/0x9e [asus_oled]
        [<ffffffff81277430>] usb_unbind_interface+0x54/0x103
        [<ffffffff812276c4>] __device_release_driver+0xa2/0xeb
        [<ffffffff81227794>] driver_detach+0x87/0xad
        [<ffffffff812269e9>] bus_remove_driver+0x91/0xc1
        [<ffffffff81227fb4>] driver_unregister+0x66/0x6e
        [<ffffffff812771ed>] usb_deregister+0xbb/0xc4
        [<ffffffffa000ce87>] asus_oled_exit+0x2f/0x31 [asus_oled]
        [<ffffffff81068365>] sys_delete_module+0x1b8/0x21b
        [<ffffffff810ae3de>] ? do_munmap+0x2ef/0x313
        [<ffffffff813699bb>] system_call_fastpath+0x16/0x1b
      
      This is due to an incorrect destruction sequence in asus_oled_exit().
      
      Fix the order, fixes the bug. Tested on an Asus G50V laptop only.
      
      Cc: Jakub Schmidtke <sjakub@gmail.com>
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3589e745
    • P
      Staging: asus_oled: fix image processing · 635032cb
      Pekka Paalanen 提交于
      Programming an image was broken, because odev->buf_offs was not advanced
      for val == 0 in append_values(). This regression was introduced in:
      
       commit 1ff12a4a
       Author: Kevin A. Granade <kevin.granade@gmail.com>
       Date:   Sat Sep 5 01:03:39 2009 -0500
      
           Staging: asus_oled: Cleaned up checkpatch issues.
      
      Fix the image processing by special-casing val == 0.
      
      I have tested this change on an Asus G50V laptop only.
      
      Cc: Jakub Schmidtke <sjakub@gmail.com>
      Cc: Kevin A. Granade <kevin.granade@gmail.com>
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      635032cb
    • A
      Staging: android: binder: Don't call dump_stack in binder_vma_open · 3c1b86f1
      Arve Hjønnevåg 提交于
      If user-space partially unmaps the driver, binder_vma_open
      would dump the kernel stack. This is not a kernel bug however
      and will be treated as if the whole area was unmapped once
      binder_vma_close gets called.
      Signed-off-by: NArve Hjønnevåg <arve@android.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3c1b86f1
    • L
      staging: r8712u: Add new Sitecom UsB ID · 1793bf1d
      Larry Finger 提交于
      Add USB ID for SITECOM WLA-1000 V1 001 WLAN
      Reported-and-tested-by: NRoland Gruber <post@rolandgruber.de>
      Reported-and-tested-by: NDario Lucia <dario.lucia@gmail.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1793bf1d
    • D
      zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention. · e8b45534
      Dan Magenheimer 提交于
      SWIZ_BITS > 8 results in a much larger number of "tmem_obj"
      allocations, likely one per page-placed-in-frontswap.  The
      tmem_obj is not huge (roughly 100 bytes), but it is large
      enough to add a not-insignificant memory overhead to zcache.
      
      The SWIZ_BITS=8  will get roughly the same lock contention
      without the space wastage.
      
      The effect of SWIZ_BITS can be thought of as "2^SWIZ_BITS is
      the number of unique oids that be generated" (This concept is
      limited to frontswap's use of tmem).
      Acked-by: NSeth Jennings <sjenning@linux.vnet.ibm.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e8b45534
    • D
      zcache: fix deadlock condition · 9256a478
      Dan Magenheimer 提交于
      I discovered this deadlock condition awhile ago working on RAMster
      but it affects zcache as well.  The list spinlock must be
      locked prior to the page spinlock and released after.  As
      a result, the page copy must also be done while the locks are held.
      
      Applies to 3.2.  Konrad, please push (via GregKH?)...
      this is definitely a bug fix so need not be pushed during
      a -rc0 window.
      Signed-off-by: NDan Magenheimer <dan.magenheimer@oracle.com>
      Acked-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9256a478
    • R
      staging: drm/omap: fix locking issue · c5b1247b
      Rob Clark 提交于
      The create/free mmap offset code must be synchronized.  Yet only some
      callers of omap_gem_mmap_offset() held struct_mutex.  Leading to various
      crashes around drm_mm_insert_helper_range().  (In the free-object path,
      which is currently the only place we drm_gem_free_mmap_offset(),
      struct_mutex is already held.)
      Signed-off-by: NRob Clark <rob@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c5b1247b
    • J
      drivers/staging/omapdrm/omap_fbdev.c: move free after uses · a9e8d70c
      Julia Lawall 提交于
      Move the free after the final uses.
      
      The semantic patch that makes this report is available
      in scripts/coccinelle/free/kfree.cocci.
      
      More information about semantic patching is available at
      http://coccinelle.lip6.fr/Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a9e8d70c