1. 18 Feb, 2009 1 commit
  2. 13 Feb, 2009 27 commits
  3. 12 Feb, 2009 4 commits
  4. 11 Feb, 2009 8 commits
    • Ian Dall's avatar
      w1: w1 temp calculation overflow fix · 507e2fba
      Ian Dall authored
      Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12646
      
      When the temperature exceeds 32767 milli-degrees the temperature overflows
      to -32768 millidegrees.  These are bothe well within the -55 - +125 degree
      range for the sensor.
      
      Fix overflow in left-shift of a u8.
      Signed-off-by: default avatarIan Dall <ian@beware.dropbear.id.au>
      Signed-off-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      507e2fba
    • Paul Clements's avatar
      nbd: fix I/O hang on disconnected nbds · 4d48a542
      Paul Clements authored
      Fix a problem that causes I/O to a disconnected (or partially initialized)
      nbd device to hang indefinitely.  To reproduce:
      
      # ioctl NBD_SET_SIZE_BLOCKS /dev/nbd23 514048
      # dd if=/dev/nbd23 of=/dev/null bs=4096 count=1
      
      ...hangs...
      
      This can also occur when an nbd device loses its nbd-client/server
      connection.  Although we clear the queue of any outstanding I/Os after the
      client/server connection fails, any additional I/Os that get queued later
      will hang.
      
      This bug may also be the problem reported in this bug report:
      http://bugzilla.kernel.org/show_bug.cgi?id=12277
      
      Testing would need to be performed to determine if the two issues are the
      same.
      
      This problem was introduced by the new request handling thread code ("NBD:
      allow nbd to be used locally", 3/2008), which entered into mainline around
      2.6.25.
      
      The fix, which is fairly simple, is to restore the check for lo->sock
      being NULL in do_nbd_request.  This causes I/O to an uninitialized nbd to
      immediately fail with an I/O error, as it did prior to the introduction of
      this bug.
      Signed-off-by: default avatarPaul Clements <paul.clements@steeleye.com>
      Reported-by: default avatarJon Nelson <jnelson-kernel-bugzilla@jamponi.net>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Cc: <stable@kernel.org>		[2.6.26.x, 2.6.27.x, 2.6.28.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4d48a542
    • Jeremy Fitzhardinge's avatar
      mm: rearrange exit_mmap() to unlock before arch_exit_mmap · 9480c53e
      Jeremy Fitzhardinge authored
      Christophe Saout reported [in precursor to:
      http://marc.info/?l=linux-kernel&m=123209902707347&w=4]:
      
      > Note that I also some a different issue with CONFIG_UNEVICTABLE_LRU.
      > Seems like Xen tears down current->mm early on process termination, so
      > that __get_user_pages in exit_mmap causes nasty messages when the
      > process had any mlocked pages.  (in fact, it somehow manages to get into
      > the swapping code and produces a null pointer dereference trying to get
      > a swap token)
      
      Jeremy explained:
      
      Yes.  In the normal case under Xen, an in-use pagetable is "pinned",
      meaning that it is RO to the kernel, and all updates must go via hypercall
      (or writes are trapped and emulated, which is much the same thing).  An
      unpinned pagetable is not currently in use by any process, and can be
      directly accessed as normal RW pages.
      
      As an optimisation at process exit time, we unpin the pagetable as early
      as possible (switching the process to init_mm), so that all the normal
      pagetable teardown can happen with direct memory accesses.
      
      This happens in exit_mmap() -> arch_exit_mmap().  The munlocking happens
      a few lines below.  The obvious thing to do would be to move
      arch_exit_mmap() to below the munlock code, but I think we'd want to
      call it even if mm->mmap is NULL, just to be on the safe side.
      
      Thus, this patch:
      
      exit_mmap() needs to unlock any locked vmas before calling arch_exit_mmap,
      as the latter may switch the current mm to init_mm, which would cause the
      former to fail.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: default avatarLee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: Christophe Saout <christophe@saout.de>
      Cc: Keir Fraser <keir.fraser@eu.citrix.com>
      Cc: Christophe Saout <christophe@saout.de>
      Cc: Alex Williamson <alex.williamson@hp.com>
      Cc: <stable@kernel.org>		[2.6.28.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9480c53e
    • Jiri Slaby's avatar
      parport: parport_serial, don't bind netmos ibm 0299 · 3abdbf90
      Jiri Slaby authored
      Since netmos 9835 with subids 0x1014(IBM):0x0299 is now bound with
      serial/8250_pci, because it has no parallel ports and subdevice id isn't
      in the expected form, return -ENODEV from probe function.
      
      This is performed in netmos preinit_hook.
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3abdbf90
    • Federico Cuello's avatar
      writeback: fix break condition · 89e12190
      Federico Cuello authored
      Commit dcf6a79d ("write-back: fix
      nr_to_write counter") fixed nr_to_write counter, but didn't set the break
      condition properly.
      
      If nr_to_write == 0 after being decremented it will loop one more time
      before setting done = 1 and breaking the loop.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      89e12190
    • Heiko Carstens's avatar
      syscall define: fix uml compile bug · 6c597963
      Heiko Carstens authored
      With the new system call defines we get this on uml:
      
      arch/um/sys-i386/built-in.o: In function `sys_call_table':
      (.rodata+0x308): undefined reference to `sys_sigprocmask'
      
      Reason for this is that uml passes the preprocessor option
      -Dsigprocmask=kernel_sigprocmask to gcc when compiling the kernel.
      This causes SYSCALL_DEFINE3(sigprocmask, ...) to be expanded to
      SYSCALL_DEFINEx(3, kernel_sigprocmask, ...) and finally to a system
      call named sys_kernel_sigprocmask.  However sys_sigprocmask is missing
      because of this.
      
      To avoid macro expansion for the system call name just concatenate the
      name at first define instead of carrying it through severel levels.
      This was pointed out by Al Viro.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: default avatarWANG Cong <wangcong@zeuux.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c597963
    • Carsten Otte's avatar
      ext2/xip: refuse to change xip flag during remount with busy inodes · 0e4a9b59
      Carsten Otte authored
      For a reason that I was unable to understand in three months of debugging,
      mount ext2 -o remount stopped working properly when remounting from
      regular operation to xip, or the other way around.  According to a git
      bisect search, the problem was introduced with the VM_MIXEDMAP/PTE_SPECIAL
      rework in the vm:
      
      commit 70688e4d
      Author: Nick Piggin <npiggin@suse.de>
      Date:   Mon Apr 28 02:13:02 2008 -0700
      
          xip: support non-struct page backed memory
      
      In the failing scenario, the filesystem is mounted read only via root=
      kernel parameter on s390x.  During remount (in rc.sysinit), the inodes of
      the bash binary and its libraries are busy and cannot be invalidated (the
      bash which is running rc.sysinit resides on subject filesystem).
      Afterwards, another bash process (running ifup-eth) recurses into a
      subshell, runs dup_mm (via fork).  Some of the mappings in this bash
      process were created from inodes that could not be invalidated during
      remount.
      
      Both parent and child process crash some time later due to inconsistencies
      in their address spaces.  The issue seems to be timing sensitive, various
      attempts to recreate it have failed.
      
      This patch refuses to change the xip flag during remount in case some
      inodes cannot be invalidated.  This patch keeps users from running into
      that issue.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: default avatarCarsten Otte <cotte@de.ibm.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Jared Hulbert <jaredeh@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0e4a9b59
    • Li Zefan's avatar
      cgroups: fix lockdep subclasses overflow · cfebe563
      Li Zefan authored
      I enabled all cgroup subsystems when compiling kernel, and then:
       # mount -t cgroup -o net_cls xxx /mnt
       # mkdir /mnt/0
      
      This showed up immediately:
       BUG: MAX_LOCKDEP_SUBCLASSES too low!
       turning off the locking correctness validator.
      
      It's caused by the cgroup hierarchy lock:
      	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
      		struct cgroup_subsys *ss = subsys[i];
      		if (ss->root == root)
      			mutex_lock_nested(&ss->hierarchy_mutex, i);
      	}
      
      Now we have 9 cgroup subsystems, and the above 'i' for net_cls is 8, but
      MAX_LOCKDEP_SUBCLASSES is 8.
      
      This patch uses different lockdep keys for different subsystems.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarPaul Menage <menage@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cfebe563