1. 06 May, 2009 2 commits
    • J. Bruce Fields's avatar
      lockd: fix list corruption on lockd restart · 89996df4
      J. Bruce Fields authored
      If lockd is signalled soon enough after restart then locks_start_grace()
      will try to re-add an entry to a list and trigger a lock corruption
      warning.
      
      Thanks to Wang Chen for the problem report and diagnosis.
      
      WARNING: at lib/list_debug.c:26 __list_add+0x27/0x5c()
      ...
      list_add corruption. next->prev should be prev (ef8fe958), but was ef8ff128.  (next=ef8ff128).
      ...
      Pid: 23062, comm: lockd Tainted: G        W  2.6.30-rc2 #3
      Call Trace:
      [<c042d5b5>] warn_slowpath+0x71/0xa0
      [<c0422a96>] ? update_curr+0x11d/0x125
      [<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
      [<c044b270>] ? trace_hardirqs_on+0xb/0xd
      [<c051c61a>] ? _raw_spin_lock+0x53/0xfa
      [<c051c89f>] __list_add+0x27/0x5c
      [<ef8f6daa>] locks_start_grace+0x22/0x30 [lockd]
      [<ef8f34da>] set_grace_period+0x39/0x53 [lockd]
      [<c06b8921>] ? lock_kernel+0x1c/0x28
      [<ef8f3558>] lockd+0x64/0x164 [lockd]
      [<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
      [<c04227b0>] ? complete+0x34/0x3e
      [<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
      [<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
      [<c043dd42>] kthread+0x45/0x6b
      [<c043dcfd>] ? kthread+0x0/0x6b
      [<c0403c23>] kernel_thread_helper+0x7/0x10
      Reported-by: default avatarWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: stable@kernel.org
      89996df4
    • J. Bruce Fields's avatar
      nfsd4: check for negative dentry before use in nfsv4 readdir · b2c0cea6
      J. Bruce Fields authored
      After 2f9092e1 "Fix i_mutex vs.  readdir
      handling in nfsd" (and 14f7dd63 "Copy XFS readdir hack into nfsd code"),
      an entry may be removed between the first mutex_unlock and the second
      mutex_lock. In this case, lookup_one_len() will return a negative
      dentry.  Check for this case to avoid a NULL dereference.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Reviewed-by: default avatarJ. R. Okajima <hooanon05@yahoo.co.jp>
      Cc: stable@kernel.org
      b2c0cea6
  2. 03 May, 2009 2 commits
  3. 25 Apr, 2009 1 commit
  4. 22 Apr, 2009 5 commits
    • Linus Torvalds's avatar
      Linux 2.6.30-rc3 · 09106974
      Linus Torvalds authored
      09106974
    • Arjan van de Ven's avatar
      driver synchronization: make scsi_wait_scan more advanced · d4d5291c
      Arjan van de Ven authored
      There is currently only one way for userspace to say "wait for my storage
      device to get ready for the modules I just loaded": to load the
      scsi_wait_scan module. Expectations of userspace are that once this
      module is loaded, all the (storage) devices for which the drivers
      were loaded before the module load are present.
      
      Now, there are some issues with the implementation, and the async
      stuff got caught in the middle of this: The existing code only
      waits for the scsy async probing to finish, but it did not take
      into account at all that probing might not have begun yet.
      (Russell ran into this problem on his computer and the fix works for him)
      
      This patch fixes this more thoroughly than the previous "fix", which
      had some bad side effects (namely, for kernel code that wanted to wait for
      the scsi scan it would also do an async sync, which would deadlock if you did
      it from async context already.. there's a report about that on lkml):
      The patch makes the module first wait for all device driver probes, and then it
      will wait for the scsi parallel scan to finish.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4d5291c
    • Jonathan Corbet's avatar
      Trivial: fix a typo in slow-work.h · 5dd559f0
      Jonathan Corbet authored
      Fix a comment typo in slow-work.h
      
      ...a trivial mistake, but it will mess up kerneldoc if nothing else.
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5dd559f0
    • David Howells's avatar
      PERCPU: Collect the DECLARE/DEFINE declarations together · 5028eaa9
      David Howells authored
      Collect the DECLARE/DEFINE declarations together in linux/percpu-defs.h so
      that they're in one place, and give them descriptive comments, particularly
      the SHARED_ALIGNED variant.
      
      It would be nice to collect these in linux/percpu.h, but that's not possible
      without sorting out the severe #include recursion between the x86 arch headers
      and the general headers (and possibly other arches too).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5028eaa9
    • David Howells's avatar
      FRV: Fix the section attribute on UP DECLARE_PER_CPU() · 9b8de747
      David Howells authored
      In non-SMP mode, the variable section attribute specified by DECLARE_PER_CPU()
      does not agree with that specified by DEFINE_PER_CPU().  This means that
      architectures that have a small data section references relative to a base
      register may throw up linkage errors due to too great a displacement between
      where the base register points and the per-CPU variable.
      
      On FRV, the .h declaration says that the variable is in the .sdata section, but
      the .c definition says it's actually in the .data section.  The linker throws
      up the following errors:
      
      kernel/built-in.o: In function `release_task':
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      
      To fix this, DECLARE_PER_CPU() should simply apply the same section attribute
      as does DEFINE_PER_CPU().  However, this is made slightly more complex by
      virtue of the fact that there are several variants on DEFINE, so these need to
      be matched by variants on DECLARE.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b8de747
  5. 21 Apr, 2009 30 commits