1. 30 Mar, 2008 27 commits
  2. 29 Mar, 2008 8 commits
  3. 28 Mar, 2008 5 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · af8be4e4
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        [PATCH] mnt_expire is protected by namespace_sem, no need for vfsmount_lock
        [PATCH] do shrink_submounts() for all fs types
        [PATCH] sanitize locking in mark_mounts_for_expiry() and shrink_submounts()
        [PATCH] count ghost references to vfsmounts
        [PATCH] reduce stack footprint in namespace.c
      af8be4e4
    • Jesper Juhl's avatar
      driver core: fix small mem leak in driver_add_kobj() · d478376c
      Jesper Juhl authored
      The Coverity checker spotted that we leak the storage allocated to 'name' in
      int driver_add_kobj().  The leak looks legit to me - this is the code :
      
      int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
                          const char *fmt, ...)
      {
              va_list args;
              char *name;
              int ret;
      
              va_start(args, fmt);
              name = kvasprintf(GFP_KERNEL, fmt, args);
              ^^^^^^^^ This dynamically allocates space...
      
              va_end(args);
      
              if (!name)
                      return -ENOMEM;
      
              return kobject_add(kobj, &drv->p->kobj, "%s", name);
      	^^^^^^^^ This neglects to free the space allocated
      }
      
      Inside kobject_add() a copy of 'name' will be made and used.  As far as I can
      see, Coverity is correct in flagging this as a leak, but I'd like some
      configmation before the patch is applied.
      
      This should fix it.
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d478376c
    • Alasdair G Kergon's avatar
      dm io: write error bits form long not int · 4cdc1d1f
      Alasdair G Kergon authored
      write_err is an unsigned long used with set_bit() so should not be passed
      around as unsigned int.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=10271Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.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>
      4cdc1d1f
    • Andrew Morton's avatar
      memstick: suppress uninitialized-var warning · d250dad6
      Andrew Morton authored
      drivers/memstick/host/tifm_ms.c: In function 'tifm_ms_data_event':
      drivers/memstick/host/tifm_ms.c:185: warning: 'p_off' may be used uninitialized in this function
      
      Cc: Alex Dubov <oakad@yahoo.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d250dad6
    • Anton Vorontsov's avatar
      mtd: maps/physmap: fix oops in suspend/resume/shutdown ops · 4a5691c0
      Anton Vorontsov authored
      # reboot
      ...
      [   42.351266] Flash device refused suspend due to active operation (state 0)
      [   42.358195] Unable to handle kernel NULL pointer dereference at virtual address 00000078
      [   42.360060] pgd = c7d9c000
      [   42.362769] [00000078] *pgd=a7d8d031, *pte=00000000, *ppte=00000000
      [   42.372902] Internal error: Oops: 17 [#1]
      [   42.376911] Modules linked in:
      [   42.379980] CPU: 0    Not tainted  (2.6.25-rc2-10642-ge8f2594-dirty #73)
      [   42.380000] PC is at physmap_flash_shutdown+0x28/0x54
      ...
      [   42.380000] Backtrace:
      [   42.380000] [<c0130c1c>] (physmap_flash_shutdown+0x0/0x54) from [<c01207c0>] (platform_drv_shutdown+0x20/0x24)
      [   42.380000]  r5:28121969 r4:c0229e08
      [   42.380000] [<c01207a0>] (platform_drv_shutdown+0x0/0x24) from [<c011cd40>] (device_shutdown+0x60/0x88)
      [   42.380000] [<c011cce0>] (device_shutdown+0x0/0x88) from [<c003e8a4>] (kernel_restart_prepare+0x2c/0x3c)
      [   42.380000]  r4:00000000
      [   42.380000] [<c003e878>] (kernel_restart_prepare+0x0/0x3c) from [<c003ea00>] (kernel_restart+0x14/0x48)
      [   42.380000] [<c003e9ec>] (kernel_restart+0x0/0x48) from [<c003fdc0>] (sys_reboot+0xe8/0x1f8)
      [   42.380000]  r4:01234567
      [   42.380000] [<c003fcd8>] (sys_reboot+0x0/0x1f8) from [<c001aa00>] (ret_fast_syscall+0x0/0x2c)
      [   42.380000]  r7:00000058 r6:00000004 r5:00000001 r4:00000000
      [   42.380000] Code: 0a000009 e7953004 e1a00003 e1a0e00f (e593f078)
      [   42.650051] ---[ end trace 6d6c26a0fc3141de ]---
      Segmentation fault
      INIT: no more processes left in this runlevel
      
      While looping for mtd[i]s, we should stop at the mtd[i] == NULL.
      
      This patch also removes unnecessary "if (info)" checks:
      suspend/resume/shutdown ops are executed only if probe() is succeeded, so info
      is guaranteed to be !NULL.
      Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a5691c0