1. 11 Nov, 2011 24 commits
  2. 25 Oct, 2011 16 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.0.8 · 97596c34
      Greg Kroah-Hartman authored
      97596c34
    • Seth Forshee's avatar
      hfsplus: Fix kfree of wrong pointers in hfsplus_fill_super() error path · d2a0110b
      Seth Forshee authored
      commit f588c960 upstream.
      
      Commit 6596528e ("hfsplus: ensure bio requests are not smaller than
      the hardware sectors") changed the pointers used for volume header
      allocations but failed to free the correct pointers in the error path
      path of hfsplus_fill_super() and hfsplus_read_wrapper.
      
      The second hunk came from a separate patch by Pavel Ivanov.
      Reported-by: default avatarPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@tuxera.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d2a0110b
    • Takashi Iwai's avatar
      ALSA: hda - Add position_fix quirk for Dell Inspiron 1010 · 818c85eb
      Takashi Iwai authored
      commit 051a8cb6 upstream.
      
      The previous fix for the position-buffer check gives yet another
      regression on a Dell laptop.  The safest fix right now is to add a
      static quirk for this device (and better to apply it for stable
      kernels too).
      Reported-by: default avatarÉric Piel <Eric.Piel@tremplin-utc.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      818c85eb
    • Daniel Suchy's avatar
      ALSA: HDA: conexant support for Lenovo T520/W520 · 9a09cfcb
      Daniel Suchy authored
      commit ca201c09 upstream.
      
      This is patch for Conexant codec of Intel HDA driver, adding new quirk
      for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
      T520 (similar subsystem ID is used also in W520 model) and detects more
      mixer features compared to generic (fallback) Lenovo quirk with
      hardcoded options in Conexant codec.
      
      Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
      problems.
      Signed-off-by: default avatarDaniel Suchy <danny@danysek.cz>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9a09cfcb
    • Nick Bowler's avatar
      crypto: ghash - Avoid null pointer dereference if no key is set · bf9f0eb8
      Nick Bowler authored
      commit 7ed47b7d upstream.
      
      The ghash_update function passes a pointer to gf128mul_4k_lle which will
      be NULL if ghash_setkey is not called or if the most recent call to
      ghash_setkey failed to allocate memory.  This causes an oops.  Fix this
      up by returning an error code in the null case.
      
      This is trivially triggered from unprivileged userspace through the
      AF_ALG interface by simply writing to the socket without setting a key.
      
      The ghash_final function has a similar issue, but triggering it requires
      a memory allocation failure in ghash_setkey _after_ at least one
      successful call to ghash_update.
      
        BUG: unable to handle kernel NULL pointer dereference at 00000670
        IP: [<d88c92d4>] gf128mul_4k_lle+0x23/0x60 [gf128mul]
        *pde = 00000000
        Oops: 0000 [#1] PREEMPT SMP
        Modules linked in: ghash_generic gf128mul algif_hash af_alg nfs lockd nfs_acl sunrpc bridge ipv6 stp llc
      
        Pid: 1502, comm: hashatron Tainted: G        W   3.1.0-rc9-00085-ge9308cfd #32 Bochs Bochs
        EIP: 0060:[<d88c92d4>] EFLAGS: 00000202 CPU: 0
        EIP is at gf128mul_4k_lle+0x23/0x60 [gf128mul]
        EAX: d69db1f0 EBX: d6b8ddac ECX: 00000004 EDX: 00000000
        ESI: 00000670 EDI: d6b8ddac EBP: d6b8ddc8 ESP: d6b8dda4
         DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
        Process hashatron (pid: 1502, ti=d6b8c000 task=d6810000 task.ti=d6b8c000)
        Stack:
         00000000 d69db1f0 00000163 00000000 d6b8ddc8 c101a520 d69db1f0 d52aa000
         00000ff0 d6b8dde8 d88d310f d6b8a3f8 d52aa000 00001000 d88d502c d6b8ddfc
         00001000 d6b8ddf4 c11676ed d69db1e8 d6b8de24 c11679ad d52aa000 00000000
        Call Trace:
         [<c101a520>] ? kmap_atomic_prot+0x37/0xa6
         [<d88d310f>] ghash_update+0x85/0xbe [ghash_generic]
         [<c11676ed>] crypto_shash_update+0x18/0x1b
         [<c11679ad>] shash_ahash_update+0x22/0x36
         [<c11679cc>] shash_async_update+0xb/0xd
         [<d88ce0ba>] hash_sendpage+0xba/0xf2 [algif_hash]
         [<c121b24c>] kernel_sendpage+0x39/0x4e
         [<d88ce000>] ? 0xd88cdfff
         [<c121b298>] sock_sendpage+0x37/0x3e
         [<c121b261>] ? kernel_sendpage+0x4e/0x4e
         [<c10b4dbc>] pipe_to_sendpage+0x56/0x61
         [<c10b4e1f>] splice_from_pipe_feed+0x58/0xcd
         [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10
         [<c10b51f5>] __splice_from_pipe+0x36/0x55
         [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10
         [<c10b6383>] splice_from_pipe+0x51/0x64
         [<c10b63c2>] ? default_file_splice_write+0x2c/0x2c
         [<c10b63d5>] generic_splice_sendpage+0x13/0x15
         [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10
         [<c10b527f>] do_splice_from+0x5d/0x67
         [<c10b6865>] sys_splice+0x2bf/0x363
         [<c129373b>] ? sysenter_exit+0xf/0x16
         [<c104dc1e>] ? trace_hardirqs_on_caller+0x10e/0x13f
         [<c129370c>] sysenter_do_call+0x12/0x32
        Code: 83 c4 0c 5b 5e 5f c9 c3 55 b9 04 00 00 00 89 e5 57 8d 7d e4 56 53 8d 5d e4 83 ec 18 89 45 e0 89 55 dc 0f b6 70 0f c1 e6 04 01 d6 <f3> a5 be 0f 00 00 00 4e 89 d8 e8 48 ff ff ff 8b 45 e0 89 da 0f
        EIP: [<d88c92d4>] gf128mul_4k_lle+0x23/0x60 [gf128mul] SS:ESP 0068:d6b8dda4
        CR2: 0000000000000670
        ---[ end trace 4eaa2a86a8e2da24 ]---
        note: hashatron[1502] exited with preempt_count 1
        BUG: scheduling while atomic: hashatron/1502/0x10000002
        INFO: lockdep is turned off.
        [...]
      Signed-off-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bf9f0eb8
    • Matthew Daley's avatar
      x25: Prevent skb overreads when checking call user data · 4ea7f3aa
      Matthew Daley authored
      commit 7f81e25b upstream.
      
      x25_find_listener does not check that the amount of call user data given
      in the skb is big enough in per-socket comparisons, hence buffer
      overreads may occur.  Fix this by adding a check.
      Signed-off-by: default avatarMatthew Daley <mattjd@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Acked-by: default avatarAndrew Hendry <andrew.hendry@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4ea7f3aa
    • Hugh Dickins's avatar
      mm: fix race between mremap and removing migration entry · 6b2f66dc
      Hugh Dickins authored
      commit 486cf46f upstream.
      
      I don't usually pay much attention to the stale "? " addresses in
      stack backtraces, but this lucky report from Pawel Sikora hints that
      mremap's move_ptes() has inadequate locking against page migration.
      
       3.0 BUG_ON(!PageLocked(p)) in migration_entry_to_page():
       kernel BUG at include/linux/swapops.h:105!
       RIP: 0010:[<ffffffff81127b76>]  [<ffffffff81127b76>]
                             migration_entry_wait+0x156/0x160
        [<ffffffff811016a1>] handle_pte_fault+0xae1/0xaf0
        [<ffffffff810feee2>] ? __pte_alloc+0x42/0x120
        [<ffffffff8112c26b>] ? do_huge_pmd_anonymous_page+0xab/0x310
        [<ffffffff81102a31>] handle_mm_fault+0x181/0x310
        [<ffffffff81106097>] ? vma_adjust+0x537/0x570
        [<ffffffff81424bed>] do_page_fault+0x11d/0x4e0
        [<ffffffff81109a05>] ? do_mremap+0x2d5/0x570
        [<ffffffff81421d5f>] page_fault+0x1f/0x30
      
      mremap's down_write of mmap_sem, together with i_mmap_mutex or lock,
      and pagetable locks, were good enough before page migration (with its
      requirement that every migration entry be found) came in, and enough
      while migration always held mmap_sem; but not enough nowadays, when
      there's memory hotremove and compaction.
      
      The danger is that move_ptes() lets a migration entry dodge around
      behind remove_migration_pte()'s back, so it's in the old location when
      looking at the new, then in the new location when looking at the old.
      
      Either mremap's move_ptes() must additionally take anon_vma lock(), or
      migration's remove_migration_pte() must stop peeking for is_swap_entry()
      before it takes pagetable lock.
      
      Consensus chooses the latter: we prefer to add overhead to migration
      than to mremapping, which gets used by JVMs and by exec stack setup.
      Reported-and-tested-by: default avatarPaweł Sikora <pluto@agmk.net>
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6b2f66dc
    • Jean Delvare's avatar
      hwmon: (w83627ehf) Fix negative 8-bit temperature values · 63e01015
      Jean Delvare authored
      commit 133d324d upstream.
      
      Since 8-bit temperature values are now handled in 16-bit struct
      members, values have to be cast to s8 for negative temperatures to be
      properly handled. This is broken since kernel version 2.6.39
      (commit bce26c58.)
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      63e01015
    • Takashi Iwai's avatar
      x86: Fix S4 regression · 83643e5d
      Takashi Iwai authored
      commit 8548c84d upstream.
      
      Commit 4b239f45 ("x86-64, mm: Put early page table high") causes a S4
      regression since 2.6.39, namely the machine reboots occasionally at S4
      resume.  It doesn't happen always, overall rate is about 1/20.  But,
      like other bugs, once when this happens, it continues to happen.
      
      This patch fixes the problem by essentially reverting the memory
      assignment in the older way.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Yinghai Lu <yinghai.lu@oracle.com>
      [ We'll hopefully find the real fix, but that's too late for 3.1 now ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      83643e5d
    • Chris Boot's avatar
      firewire: sbp2: fix panic after rmmod with slow targets · f92a292a
      Chris Boot authored
      commit 0278ccd9 upstream.
      
      If firewire-sbp2 starts a login to a target that doesn't complete ORBs
      in a timely manner (and has to retry the login), and the module is
      removed before the operation times out, you end up with a null-pointer
      dereference and a kernel panic.
      
      [SR:  This happens because sbp2_target_get/put() do not maintain
      module references.  scsi_device_get/put() do, but at occasions like
      Chris describes one, nobody holds a reference to an SBP-2 sdev.]
      
      This patch cancels pending work for each unit in sbp2_remove(), which
      hopefully means there are no extra references around that prevent us
      from unloading. This fixes my crash.
      Signed-off-by: default avatarChris Boot <bootc@bootc.net>
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f92a292a
    • Christoph Hellwig's avatar
      xfs: revert to using a kthread for AIL pushing · c7eead1e
      Christoph Hellwig authored
      commit 0030807c upstream
      
      Currently we have a few issues with the way the workqueue code is used to
      implement AIL pushing:
      
       - it accidentally uses the same workqueue as the syncer action, and thus
         can be prevented from running if there are enough sync actions active
         in the system.
       - it doesn't use the HIGHPRI flag to queue at the head of the queue of
         work items
      
      At this point I'm not confident enough in getting all the workqueue flags and
      tweaks right to provide a perfectly reliable execution context for AIL
      pushing, which is the most important piece in XFS to make forward progress
      when the log fills.
      
      Revert back to use a kthread per filesystem which fixes all the above issues
      at the cost of having a task struct and stack around for each mounted
      filesystem.  In addition this also gives us much better ways to diagnose
      any issues involving hung AIL pushing and removes a small amount of code.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Tested-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c7eead1e
    • Christoph Hellwig's avatar
      xfs: force the log if we encounter pinned buffers in .iop_pushbuf · e7bde7c7
      Christoph Hellwig authored
      commit 17b38471 upstream
      
      We need to check for pinned buffers even in .iop_pushbuf given that inode
      items flush into the same buffers that may be pinned directly due operations
      on the unlinked inode list operating directly on buffers.  To do this add a
      return value to .iop_pushbuf that tells the AIL push about this and use
      the existing log force mechanisms to unpin it.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Tested-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e7bde7c7
    • Christoph Hellwig's avatar
      xfs: do not update xa_last_pushed_lsn for locked items · 838599d1
      Christoph Hellwig authored
      commit bc6e588a upstream
      
      If an item was locked we should not update xa_last_pushed_lsn and thus skip
      it when restarting the AIL scan as we need to be able to lock and write it
      out as soon as possible.  Otherwise heavy lock contention might starve AIL
      pushing too easily, especially given the larger backoff once we moved
      xa_last_pushed_lsn all the way to the target lsn.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Tested-by: default avatarStefan Priebe <s.priebe@profihost.ag>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      838599d1
    • Dave Chinner's avatar
      xfs: use a cursor for bulk AIL insertion · f5d5ee36
      Dave Chinner authored
      commit 1d8c95a3 upstream
      
      
      xfs: use a cursor for bulk AIL insertion
      
      Delayed logging can insert tens of thousands of log items into the
      AIL at the same LSN. When the committing of log commit records
      occur, we can get insertions occurring at an LSN that is not at the
      end of the AIL. If there are thousands of items in the AIL on the
      tail LSN, each insertion has to walk the AIL to find the correct
      place to insert the new item into the AIL. This can consume large
      amounts of CPU time and block other operations from occurring while
      the traversals are in progress.
      
      To avoid this repeated walk, use a AIL cursor to record
      where we should be inserting the new items into the AIL without
      having to repeat the walk. The cursor infrastructure already
      provides this functionality for push walks, so is a simple extension
      of existing code. While this will not avoid the initial walk, it
      will avoid repeating it tens of thousands of times during a single
      checkpoint commit.
      
      This version includes logic improvements from Christoph Hellwig.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f5d5ee36
    • Christoph Hellwig's avatar
      xfs: start periodic workers later · eedc6389
      Christoph Hellwig authored
      commit 2bcf6e97 upstream
      
      Start the periodic sync workers only after we have finished xfs_mountfs
      and thus fully set up the filesystem structures.  Without this we can
      call into xfs_qm_sync before the quotainfo strucute is set up if the
      mount takes unusually long, and probably hit other incomplete states
      as well.
      
      Also clean up the xfs_fs_fill_super error path by using consistent
      label names, and removing an impossible to reach case.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarArkadiusz Miskiewicz <arekm@maven.pl>
      Reviewed-by: default avatarAlex Elder <aelder@sgi.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      eedc6389
    • Pavel Shilovsky's avatar
      CIFS: Fix ERR_PTR dereference in cifs_get_root · f24d5457
      Pavel Shilovsky authored
      commit 5b980b01 upstream.
      
      move it to the beginning of the loop.
      Signed-off-by: default avatarPavel Shilovsky <piastryyy@gmail.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f24d5457