1. 10 Aug, 2011 2 commits
    • Jonathan Nieder's avatar
      cap_syslog: don't use WARN_ONCE for CAP_SYS_ADMIN deprecation warning · f2c0d026
      Jonathan Nieder authored
      syslog-ng versions before 3.3.0beta1 (2011-05-12) assume that
      CAP_SYS_ADMIN is sufficient to access syslog, so ever since CAP_SYSLOG
      was introduced (2010-11-25) they have triggered a warning.
      
      Commit ee24aebf ("cap_syslog: accept CAP_SYS_ADMIN for now")
      improved matters a little by making syslog-ng work again, just keeping
      the WARN_ONCE().  But still, this is a warning that writes a stack trace
      we don't care about to syslog, sets a taint flag, and alarms sysadmins
      when nothing worse has happened than use of an old userspace with a
      recent kernel.
      
      Convert the WARN_ONCE to a printk_once to avoid that while continuing to
      give userspace developers a hint that this is an unwanted
      backward-compatibility feature and won't be around forever.
      Reported-by: default avatarRalf Hildebrandt <ralf.hildebrandt@charite.de>
      Reported-by: default avatarNiels <zorglub_olsen@hotmail.com>
      Reported-by: default avatarPaweł Sikora <pluto@agmk.net>
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Liked-by: default avatarGergely Nagy <algernon@madhouse-project.org>
      Acked-by: default avatarSerge Hallyn <serge@hallyn.com>
      Acked-by: default avatarJames Morris <jmorris@namei.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2c0d026
    • Michal Hocko's avatar
      Revert "memcg: get rid of percpu_charge_mutex lock" · 9f50fad6
      Michal Hocko authored
      This reverts commit 8521fc50.
      
      The patch incorrectly assumes that using atomic FLUSHING_CACHED_CHARGE
      bit operations is sufficient but that is not true.  Johannes Weiner has
      reported a crash during parallel memory cgroup removal:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
        IP: [<ffffffff81083b70>] css_is_ancestor+0x20/0x70
        Oops: 0000 [#1] PREEMPT SMP
        Pid: 19677, comm: rmdir Tainted: G        W   3.0.0-mm1-00188-gf38d32b #35 ECS MCP61M-M3/MCP61M-M3
        RIP: 0010:[<ffffffff81083b70>]  css_is_ancestor+0x20/0x70
        RSP: 0018:ffff880077b09c88  EFLAGS: 00010202
        Process rmdir (pid: 19677, threadinfo ffff880077b08000, task ffff8800781bb310)
        Call Trace:
         [<ffffffff810feba3>] mem_cgroup_same_or_subtree+0x33/0x40
         [<ffffffff810feccf>] drain_all_stock+0x11f/0x170
         [<ffffffff81103211>] mem_cgroup_force_empty+0x231/0x6d0
         [<ffffffff811036c4>] mem_cgroup_pre_destroy+0x14/0x20
         [<ffffffff81080559>] cgroup_rmdir+0xb9/0x500
         [<ffffffff81114d26>] vfs_rmdir+0x86/0xe0
         [<ffffffff81114e7b>] do_rmdir+0xfb/0x110
         [<ffffffff81114ea6>] sys_rmdir+0x16/0x20
         [<ffffffff8154d76b>] system_call_fastpath+0x16/0x1b
      
      We are crashing because we try to dereference cached memcg when we are
      checking whether we should wait for draining on the cache.  The cache is
      already cleaned up, though.
      
      There is also a theoretical chance that the cached memcg gets freed
      between we test for the FLUSHING_CACHED_CHARGE and dereference it in
      mem_cgroup_same_or_subtree:
      
              CPU0                    CPU1                         CPU2
        mem=stock->cached
        stock->cached=NULL
                                    clear_bit
                                                              test_and_set_bit
        test_bit()                    ...
        <preempted>             mem_cgroup_destroy
        use after free
      
      The percpu_charge_mutex protected from this race because sync draining
      is exclusive.
      
      It is safer to revert now and come up with a more parallel
      implementation later.
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Reported-by: default avatarJohannes Weiner <jweiner@redhat.com>
      Acked-by: default avatarJohannes Weiner <jweiner@redhat.com>
      Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9f50fad6
  2. 09 Aug, 2011 7 commits
    • Linus Torvalds's avatar
      47e180d6
    • Christoph Lameter's avatar
      slub: Fix partial count comparison confusion · 81107188
      Christoph Lameter authored
      deactivate_slab() has the comparison if more than the minimum number of
      partial pages are in the partial list wrong. An effect of this may be that
      empty pages are not freed from deactivate_slab(). The result could be an
      OOM due to growth of the partial slabs per node. Frees mostly occur from
      __slab_free which is okay so this would only affect use cases where a lot
      of switching around of per cpu slabs occur.
      
      Switching per cpu slabs occurs with high frequency if debugging options are
      enabled.
      Reported-and-tested-by: default avatarXiaotian Feng <xtfeng@gmail.com>
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      81107188
    • Linus Torvalds's avatar
      Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 · e6a99d31
      Linus Torvalds authored
      * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        slub: fix check_bytes() for slub debugging
        slub: Fix full list corruption if debugging is on
      e6a99d31
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 6bb615bc
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        sound: pss - don't use the deprecated function check_region
        ALSA: timer - Add NULL-check for invalid slave timer
        ALSA: timer - Fix Oops at closing slave timer
        ASoC: Acknowledge WM8996 interrupts before acting on them
        ASoC: Rename WM8915 to WM8996
        ALSA: Fix dependency of CONFIG_SND_TEA575X
        ALSA: asihpi - use kzalloc()
        ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3
        ALSA: snd-usb: Fix uninitialized variable usage
        ALSA: hda - Fix a complile warning in patch_via.c
        ALSA: hdspm - Fix uninitialized compile warnings
        ALSA: usb-audio - add quirk for Keith McMillen StringPort
        ALSA: snd-usb: operate on given mixer interface only
        ALSA: snd-usb: avoid dividing by zero on invalid input
        ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
        sound: oss/pas2: Remove CLOCK_TICK_RATE dependency from PAS16 driver
        ALSA: hda - Use auto-parser for ASUS UX50, Eee PC P901, S101 and P1005
        ALSA: hda - Fix digital-mic mono recording on ASUS Eee PC
        ASoC: sgtl5000: fix cache handling
        ASoC: Disable wm_hubs periodic DC servo update
      6bb615bc
    • Alan Cox's avatar
      gma500: Fix clashes with DRM updates · ab04fc58
      Alan Cox authored
      The private object support has migrated from gma500 into the DRM core,
      remove our now clashing copy.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab04fc58
    • Akinobu Mita's avatar
      slub: fix check_bytes() for slub debugging · ef62fb32
      Akinobu Mita authored
      The check_bytes() function is used by slub debugging.  It returns a pointer
      to the first unmatching byte for a character in the given memory area.
      
      If the character for matching byte is greater than 0x80, check_bytes()
      doesn't work.  Becuase 64-bit pattern is generated as below.
      
      	value64 = value | value << 8 | value << 16 | value << 24;
      	value64 = value64 | value64 << 32;
      
      The integer promotions are performed and sign-extended as the type of value
      is u8.  The upper 32 bits of value64 is 0xffffffff in the first line, and
      the second line has no effect.
      
      This fixes the 64-bit pattern generation.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Matt Mackall <mpm@selenic.com>
      Reviewed-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      ef62fb32
    • Christoph Lameter's avatar
      slub: Fix full list corruption if debugging is on · 6fbabb20
      Christoph Lameter authored
      When a slab is freed by __slab_free() and the slab can only contain a
      single object ever then it was full (and therefore not on the partial
      lists but on the full list in the debug case) before we reached
      slab_empty.
      
      This caused the following full list corruption when SLUB debugging was enabled:
      
        [ 5913.233035] ------------[ cut here ]------------
        [ 5913.233097] WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
        [ 5913.233101] Hardware name: Adamo 13
        [ 5913.233105] list_del corruption. prev->next should be ffffea000434fd20, but was ffffea0004199520
        [ 5913.233108] Modules linked in: nfs fscache fuse ebtable_nat ebtables ppdev parport_pc lp parport ipt_MASQUERADE iptable_nat nf_nat nfsd lockd nfs_acl auth_rpcgss xt_CHECKSUM sunrpc iptable_mangle bridge stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables rfcomm bnep arc4 iwlagn snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel btusb mac80211 snd_hda_codec bluetooth snd_hwdep snd_seq snd_seq_device snd_pcm usb_debug dell_wmi sparse_keymap cdc_ether usbnet cdc_acm uvcvideo cdc_wdm mii cfg80211 snd_timer dell_laptop videodev dcdbas snd microcode v4l2_compat_ioctl32 soundcore joydev tg3 pcspkr snd_page_alloc iTCO_wdt i2c_i801 rfkill iTCO_vendor_support wmi virtio_net kvm_intel kvm ipv6 xts gf128mul dm_crypt i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: scsi_wait_scan]
        [ 5913.233213] Pid: 0, comm: swapper Not tainted 3.0.0+ #127
        [ 5913.233213] Call Trace:
        [ 5913.233213]  <IRQ>  [<ffffffff8105df18>] warn_slowpath_common+0x83/0x9b
        [ 5913.233213]  [<ffffffff8105dfd3>] warn_slowpath_fmt+0x46/0x48
        [ 5913.233213]  [<ffffffff8127e7c1>] __list_del_entry+0x8d/0x98
        [ 5913.233213]  [<ffffffff8127e7da>] list_del+0xe/0x2d
        [ 5913.233213]  [<ffffffff814e0430>] __slab_free+0x1db/0x235
        [ 5913.233213]  [<ffffffff811706ab>] ? bvec_free_bs+0x35/0x37
        [ 5913.233213]  [<ffffffff811706ab>] ? bvec_free_bs+0x35/0x37
        [ 5913.233213]  [<ffffffff811706ab>] ? bvec_free_bs+0x35/0x37
        [ 5913.233213]  [<ffffffff81133085>] kmem_cache_free+0x88/0x102
        [ 5913.233213]  [<ffffffff811706ab>] bvec_free_bs+0x35/0x37
        [ 5913.233213]  [<ffffffff811706e1>] bio_free+0x34/0x64
        [ 5913.233213]  [<ffffffff813dc390>] dm_bio_destructor+0x12/0x14
        [ 5913.233213]  [<ffffffff8116fef6>] bio_put+0x2b/0x2d
        [ 5913.233213]  [<ffffffff813dccab>] clone_endio+0x9e/0xb4
        [ 5913.233213]  [<ffffffff8116f7dd>] bio_endio+0x2d/0x2f
        [ 5913.233213]  [<ffffffffa00148da>] crypt_dec_pending+0x5c/0x8b [dm_crypt]
        [ 5913.233213]  [<ffffffffa00150a9>] crypt_endio+0x78/0x81 [dm_crypt]
      
      [ Full discussion here: https://lkml.org/lkml/2011/8/4/375 ]
      
      Make sure that we remove such a slab also from the full lists.
      Reported-and-tested-by: default avatarDave Jones <davej@redhat.com>
      Reported-and-tested-by: default avatarXiaotian Feng <xtfeng@gmail.com>
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      6fbabb20
  3. 08 Aug, 2011 16 commits
  4. 07 Aug, 2011 15 commits