1. 25 2月, 2012 1 次提交
    • A
      mm: memcg: Correct unregistring of events attached to the same eventfd · 371528ca
      Anton Vorontsov 提交于
      There is an issue when memcg unregisters events that were attached to
      the same eventfd:
      
      - On the first call mem_cgroup_usage_unregister_event() removes all
        events attached to a given eventfd, and if there were no events left,
        thresholds->primary would become NULL;
      
      - Since there were several events registered, cgroups core will call
        mem_cgroup_usage_unregister_event() again, but now kernel will oops,
        as the function doesn't expect that threshold->primary may be NULL.
      
      That's a good question whether mem_cgroup_usage_unregister_event()
      should actually remove all events in one go, but nowadays it can't
      do any better as cftype->unregister_event callback doesn't pass
      any private event-associated cookie. So, let's fix the issue by
      simply checking for threshold->primary.
      
      FWIW, w/o the patch the following oops may be observed:
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
       IP: [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
       Pid: 574, comm: kworker/0:2 Not tainted 3.3.0-rc4+ #9 Bochs Bochs
       RIP: 0010:[<ffffffff810be32c>]  [<ffffffff810be32c>] mem_cgroup_usage_unregister_event+0x9c/0x1f0
       RSP: 0018:ffff88001d0b9d60  EFLAGS: 00010246
       Process kworker/0:2 (pid: 574, threadinfo ffff88001d0b8000, task ffff88001de91cc0)
       Call Trace:
        [<ffffffff8107092b>] cgroup_event_remove+0x2b/0x60
        [<ffffffff8103db94>] process_one_work+0x174/0x450
        [<ffffffff8103e413>] worker_thread+0x123/0x2d0
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      371528ca
  2. 24 2月, 2012 4 次提交
    • A
      Restore direct_io / truncate locking API · 37fbf4bf
      Anton Altaparmakov 提交于
      With kernel 3.1, Christoph removed i_alloc_sem and replaced it with
      calls (namely inode_dio_wait() and inode_dio_done()) which are
      EXPORT_SYMBOL_GPL() thus they cannot be used by non-GPL file systems and
      further inode_dio_wait() was pushed from notify_change() into the file
      system ->setattr() method but no non-GPL file system can make this call.
      
      That means non-GPL file systems cannot exist any more unless they do not
      use any VFS functionality related to reading/writing as far as I can
      tell or at least as long as they want to implement direct i/o.
      
      Both Linus and Al (and others) have said on LKML that this breakage of
      the VFS API should not have happened and that the change was simply
      missed as it was not documented in the change logs of the patches that
      did those changes.
      
      This patch changes the two function exports in question to be
      EXPORT_SYMBOL() thus restoring the VFS API as it used to be - accessible
      for all modules.
      
      Christoph, who introduced the two functions and exported them GPL-only
      is CC-ed on this patch to give him the opportunity to object to the
      symbols being changed in this manner if he did indeed intend them to be
      GPL-only and does not want them to become available to all modules.
      Signed-off-by: NAnton Altaparmakov <anton@tuxera.com>
      CC: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      37fbf4bf
    • L
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · bb4c7e9a
      Linus Torvalds 提交于
      A fix from Jesper Juhl removes an assignment in an ASSERT when a compare
      is intended.  Two fixes from Mitsuo Hayasaka address off-by-ones in XFS
      quota enforcement.
      
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: make inode quota check more general
        xfs: change available ranges of softlimit and hardlimit in quota check
        XFS: xfs_trans_add_item() - don't assign in ASSERT() when compare is intended
      bb4c7e9a
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 73c8e679
      Linus Torvalds 提交于
      BenH says:
       'Here are a few more powerpc bits for you.  A stupid regression I
        introduced with my previous commit to "fix" program check exceptions
        (brown paper bag for me), fix the cpuidle default, a bug fix for
        something that isn't strictly speaking a regression but some upstream
        changes causes it to show in lockdep now while it didn't before, and
        finally a trivial one for rusty to make his life easier later on
        removing the old cpumask cruft. '
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: Fix various issues with return to userspace
        cpuidle: Default y on powerpc pSeries
        powerpc: Fix program check handling when lockdep is enabled
        powerpc: Remove references to cpu_*_map
      73c8e679
    • L
      Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 0200971d
      Linus Torvalds 提交于
      sound fixes for 3.3-rc5
      
      Just a collection of boring small fixes for ASoC, HD-audio Realtek
      and USB-audio drivers.
      
      * tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: snd-usb-caiaq: Fix the return of XRUN
        ASoC: ak4642: fixup HeadPhone L/R dapm settings
        ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935
        ALSA: hda/realtek - Fix overflow of vol/sw check bitmap
        ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()
        ASoC: wm8962: Fix sidetone enumeration texts
      0200971d
  3. 23 2月, 2012 4 次提交
    • L
      Merge tag 'usb-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 45196cee
      Linus Torvalds 提交于
      USB bugfixes for 3.3-rc4
      
      A number of new device ids, and a cleanup/fix for some of the option
      device ids that shouldn't have been added in the first place.
      
      There's also a few USB 3 fixes for problems that people have reported,
      and a usb-storage bugfix to round it out.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'usb-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: Added Kamstrup VID/PIDs to cp210x serial driver.
        USB: Serial: ti_usb_3410_5052: Add Abbot Diabetes Care cable id
        usb-storage: fix freezing of the scanning thread
        xhci: Fix encoding for HS bulk/control NAK rate.
        USB: Set hub depth after USB3 hub reset
        USB: Fix handoff when BIOS disables host PCI device.
        USB: option: cleanup zte 3g-dongle's pid in option.c
        USB: Don't fail USB3 probe on missing legacy PCI IRQ.
        xhci: Fix oops caused by more USB2 ports than USB3 ports.
        USB: Remove duplicate USB 3.0 hub feature #defines.
      45196cee
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · e2d4370b
      Linus Torvalds 提交于
      Intel, radeon, exynos fixes.
      
      Intel: fixes a few Ivybridge hangs, along with fixing RC6 on SNB (still
      not on, but at least allows for distros to patch it on easily).
      
      radeon: oops reading some files in debugfs that weren't meant to appear,
      a fix that touches a lot of files, so looks worse than it is, it fixes
      an oops if a GPU reset fails and userspace keeps submitting more data,
      along with a minor BIOS fix for newer boards.
      
      exynos: a group of fixes for exynos, they've sent me a few more but
      these were all I got through, and its no hw vanilla kernel users see a
      lot off yet.
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms/atom: dpms bios scratch reg updates
        drm/radeon/kms: properly set accel working flag and bailout when false
        drm/radeon: Only create additional ring debugfs files on Cayman or newer.
        drm/exynos: added postclose to release resource.
        drm/exynos: removed exynos_drm_fbdev_recreate function.
        drm/exynos: fixed page flip issue.
        drm/exynos: added possible_clones setup function.
        drm/exynos: removed pageflip_event_list init code when closed.
        drm/exynos: changed priority of mixer layers.
        drm/exynos: Fix typo in exynos_mixer.c
        drm/i915: do not enable RC6p on Sandy Bridge
        drm/i915: gen7: Disable the RHWO optimization as it can cause GPU hangs.
        drm/i915: gen7: work around a system hang on IVB
        drm/i915: gen7: Implement an L3 caching workaround.
        drm/i915: gen7: implement rczunit workaround
      e2d4370b
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 71c01b9d
      Linus Torvalds 提交于
      It contains 3 important fixes for ColdFire based machines:
       - fix processes getting stuck when running from strace
       - fix kernel vmalloced pages not being visible in all kernel contexts
       - fix shared user pages sometimes being visible in another process
         context
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: Do not set global share for non-kernel shared pages
        m68k: Add shared bit to Coldfire kernel page entries
        m68knommu: fix syscall tracing stuck process
      71c01b9d
    • L
      Merge tag 'nfs-for-3.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 437cf4c7
      Linus Torvalds 提交于
      Bugfixes for the NFS client.
      
      Fix a nasty Oops in the NFSv4 getacl code, another source of infinite
      loops in the NFSv4 state recovery code, and a regression in NFSv4.1
      session initialisation.
      
      Also deal with an NFSv4.1 memory leak.
      
      * tag 'nfs-for-3.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: fix server_scope memory leak
        NFSv4.1: Fix a NFSv4.1 session initialisation regression
        NFSv4: Ensure we throw out bad delegation stateids on NFS4ERR_BAD_STATEID
        NFSv4: Fix an Oops in the NFSv4 getacl code
      437cf4c7
  4. 22 2月, 2012 25 次提交
  5. 21 2月, 2012 6 次提交
    • K
      ASoC: ak4642: fixup HeadPhone L/R dapm settings · e555cf36
      Kuninori Morimoto 提交于
      Current ak4642 driver had wrong dapm settings for headphone L/R.
      If you select headphone L, and select R after that,
      headphone L setting was removed by R settings.
      
      This patch fixes it up.
      It provides just "Headphone Enable" to user side
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      e555cf36
    • R
      ARM: OMAP: fix voltage domain build errors with PM_OPP disabled · 3ddd4d0c
      Russell King 提交于
      The voltage domain code wants the voltage tables, which are in the
      opp*.c files.  These files aren't built when PM_OPP is disabled,
      causing the following build errors at link time:
      
      twl-common.c:(.init.text+0x2e48): undefined reference to `omap34xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e4c): undefined reference to `omap34xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2e5c): undefined reference to `omap36xx_vddmpu_volt_data'
      twl-common.c:(.init.text+0x2e60): undefined reference to `omap36xx_vddcore_volt_data'
      twl-common.c:(.init.text+0x2830): undefined reference to `omap44xx_vdd_mpu_volt_data'
      twl-common.c:(.init.text+0x283c): undefined reference to `omap44xx_vdd_iva_volt_data'
      twl-common.c:(.init.text+0x2844): undefined reference to `omap44xx_vdd_core_volt_data'
      Acked-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3ddd4d0c
    • M
      ARM/PCI: Remove ARM's duplicate definition of 'pcibios_max_latency' · e23e8c06
      Myron Stowe 提交于
      The patch series to re-factor PCI's 'latency timer' setup (re:
      http://marc.info/?l=linux-kernel&m=131983853831049&w=2) forgot to
      remove the ARM specific definition of 'pcibios_max_latency' once such
      had been moved into the pci core resulting in ARM related compile
      errors -
        drivers/built-in.o:(.data+0x230): multiple definition of
        `pcibios_max_latency'
        arch/arm/common/built-in.o:(.data+0x40c): first defined here
        make[1]: *** [vmlinux.o] Error 1
      
      In the series, patch 2/16 (commit 168c8619) converted the ARM
      specific version of 'pcibios_set_master()' to a non-inlined version.
      This was done in preperation for hosting it up into PCI's core, which
      was done in patch 10/16 (commit 96c55900) of the series (and
      where the removal of ARM's 'pcibios_max_latency' was overlooked).
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e23e8c06
    • S
      ARM: 7336/1: smp_twd: Don't register CPUFREQ notifiers if local timers are not initialised · 910ba598
      Santosh Shilimkar 提交于
      Current ARM local timer code registers CPUFREQ notifiers even in case
      the twd_timer_setup() isn't called. That seems to be wrong and
      would eventually lead to kernel crash on the CPU frequency transitions
      on the SOCs where the local timer doesn't exist or broken because of
      hardware BUG. Fix it by testing twd_evt and *__this_cpu_ptr(twd_evt).
      
      The issue was observed with v3.3-rc3 and building an OMAP2+ kernel
      on OMAP3 SOC which doesn't have TWD.
      
      Below is the dump for reference :
      
       Unable to handle kernel paging request at virtual address 007e900
       pgd = cdc20000
       [007e9000] *pgd=00000000
       Internal error: Oops: 5 [#1] SMP
       Modules linked in:
       CPU: 0    Not tainted  (3.3.0-rc3-pm+debug+initramfs #9)
       PC is at twd_update_frequency+0x34/0x48
       LR is at twd_update_frequency+0x10/0x48
       pc : [<c001382c>]    lr : [<c0013808>]    psr: 60000093
       sp : ce311dd8  ip : 00000000  fp : 00000000
       r10: 00000000  r9 : 00000001  r8 : ce310000
       r7 : c0440458  r6 : c00137f8  r5 : 00000000  r4 : c0947a74
       r3 : 00000000  r2 : 007e9000  r1 : 00000000  r0 : 00000000
       Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment usr
       Control: 10c5387d  Table: 8dc20019  DAC: 00000015
       Process sh (pid: 599, stack limit = 0xce3102f8)
       Stack: (0xce311dd8 to 0xce312000)
       1dc0:                                                       6000c
       1de0: 00000001 00000002 00000000 00000000 00000000 00000000 00000
       1e00: ffffffff c093d8f0 00000000 ce311ebc 00000001 00000001 ce310
       1e20: c001386c c0437c4c c0e95b60 c0e95ba8 00000001 c0e95bf8 ffff4
       1e40: 00000000 00000000 c005ef74 ce310000 c0435cf0 ce311ebc 00000
       1e60: ce352b40 0007a120 c08d5108 c08ba040 c08ba040 c005f030 00000
       1e80: c08bc554 c032fe2c 0007a120 c08d4b64 ce352b40 c08d8618 ffff8
       1ea0: c08ba040 c033364c ce311ecc c0433b50 00000002 ffffffea c0330
       1ec0: 0007a120 0007a120 22222201 00000000 22222222 00000000 ce357
       1ee0: ce3d6000 cdc2aed8 ce352ba0 c0470164 00000002 c032f47c 00034
       1f00: c0331cac ce352b40 00000007 c032f6d0 ce352bbc 0003d090 c0930
       1f20: c093d8bc c03306a4 00000007 ce311f80 00000007 cdc2aec0 ce358
       1f40: ce8d20c0 00000007 b6fe5000 ce311f80 00000007 ce310000 0000c
       1f60: c000de74 ce987400 ce8d20c0 b6fe5000 00000000 00000000 0000c
       1f80: 00000000 00000000 001fbac8 00000000 00000007 001fbac8 00004
       1fa0: c000df04 c000dd60 00000007 001fbac8 00000001 b6fe5000 00000
       1fc0: 00000007 001fbac8 00000007 00000004 b6fe5000 00000000 00202
       1fe0: 00000000 beb565f8 00101ffc 00008e8c 60000010 00000001 00000
       [<c001382c>] (twd_update_frequency+0x34/0x48) from [<c008ac4c>] )
       [<c008ac4c>] (smp_call_function_single+0x17c/0x1c8) from [<c0013)
       [<c0013890>] (twd_cpufreq_transition+0x24/0x30) from [<c0437c4c>)
       [<c0437c4c>] (notifier_call_chain+0x44/0x84) from [<c005efe4>] ()
       [<c005efe4>] (__srcu_notifier_call_chain+0x70/0xa4) from [<c005f)
       [<c005f030>] (srcu_notifier_call_chain+0x18/0x20) from [<c032fe2)
       [<c032fe2c>] (cpufreq_notify_transition+0xc8/0x1b0) from [<c0333)
       [<c033364c>] (omap_target+0x1b4/0x28c) from [<c032f47c>] (__cpuf)
       [<c032f47c>] (__cpufreq_driver_target+0x50/0x64) from [<c0331d24)
       [<c0331d24>] (cpufreq_set+0x78/0x98) from [<c032f6d0>] (store_sc)
       [<c032f6d0>] (store_scaling_setspeed+0x5c/0x74) from [<c03306a4>)
       [<c03306a4>] (store+0x58/0x74) from [<c014d868>] (sysfs_write_fi)
       [<c014d868>] (sysfs_write_file+0x80/0xb4) from [<c00f2c2c>] (vfs)
       [<c00f2c2c>] (vfs_write+0xa8/0x138) from [<c00f2e9c>] (sys_write)
       [<c00f2e9c>] (sys_write+0x40/0x6c) from [<c000dd60>] (ret_fast_s)
       Code: e594300c e792210c e1a01000 e5840004 (e7930002)
       ---[ end trace 5da3b5167c1ecdda ]---
      Reported-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      910ba598
    • L
      i387: export 'fpu_owner_task' per-cpu variable · 27e74da9
      Linus Torvalds 提交于
      (And define it properly for x86-32, which had its 'current_task'
      declaration in separate from x86-64)
      
      Bitten by my dislike for modules on the machines I use, and the fact
      that apparently nobody else actually wanted to test the patches I sent
      out.
      
      Snif. Nobody else cares.
      
      Anyway, we probably should uninline the 'kernel_fpu_begin()' function
      that is what modules actually use and that references this, but this is
      the minimal fix for now.
      Reported-by: NJosh Boyer <jwboyer@gmail.com>
      Reported-and-tested-by: NJongman Heo <jongman.heo@samsung.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      27e74da9
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 8ebbfb49
      Linus Torvalds 提交于
      Assorted fixes, sat in -next for a week or so...
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        ocfs2: deal with wraparounds of i_nlink in ocfs2_rename()
        vfs: fix compat_sys_stat() handling of overflows in st_nlink
        quota: Fix deadlock with suspend and quotas
        vfs: Provide function to get superblock and wait for it to thaw
        vfs: fix panic in __d_lookup() with high dentry hashtable counts
        autofs4 - fix lockdep splat in autofs
        vfs: fix d_inode_lookup() dentry ref leak
      8ebbfb49