1. 21 Jan, 2009 5 commits
    • Jesper Nilsson's avatar
      klist.c: bit 0 in pointer can't be used as flag · c0e69a5b
      Jesper Nilsson authored
      The commit a1ed5b0c
      (klist: don't iterate over deleted entries) introduces use of the
      low bit in a pointer to indicate if the knode is dead or not,
      assuming that this bit is always free.
      
      This is not true for all architectures, CRIS for example may align data
      on byte borders.
      
      The result is a bunch of warnings on bootup, devices not being
      added correctly etc, reported by Hinko Kocevar <hinko.kocevar@cetrtapot.si>:
      
      ------------[ cut here ]------------
      WARNING: at lib/klist.c:62 ()
      Modules linked in:
      
      Stack from c1fe1cf0:
             c01cc7f4 c1fe1d11 c000eb4e c000e4de 00000000 00000000 c1f4f78f c1f50c2d
             c01d008c c1fdd1a0 c1fdd1a0 c1fe1d38 c0192954 c1fe0000 00000000 c1fe1dc0
             00000002 7fffffff c1fe1da8 c0192d50 c1fe1dc0 00000002 7fffffff c1ff9fcc
      Call Trace: [<c000eb4e>] [<c000e4de>] [<c0192954>] [<c0192d50>] [<c001d49e>] [<c000b688>] [<c0192a3c>]
             [<c000b63e>] [<c000b63e>] [<c001a542>] [<c00b55b0>] [<c00411c0>] [<c00b559c>] [<c01918e6>] [<c0191988>]
             [<c01919d0>] [<c00cd9c8>] [<c00cdd6a>] [<c0034178>] [<c000409a>] [<c0015576>] [<c0029130>] [<c0029078>]
             [<c0029170>] [<c0012336>] [<c00b4076>] [<c00b4770>] [<c006d6e4>] [<c006d974>] [<c006dca0>] [<c0028d6c>]
             [<c0028e12>] [<c0006424>] <4>---[ end trace 4eaa2a86a8e2da22 ]---
      ------------[ cut here ]------------
      Repeat ad nauseam.
      
      Wed, Jan 14, 2009 at 12:11:32AM +0100, Bastien ROUCARIES wrote:
      > Perhaps using a pointerhackalign trick on this structure where
      > #define pointerhackalign(x) __attribute__ ((aligned (x)))
      > and declare
      > struct klist_node {
      > ...
      > }  pointerhackalign(2);
      >
      > Because  __attribute__ ((aligned (x))) could only increase alignment
      > it will safe to do that and serve as documentation purpose :)
      
      That works, but we need to do it not for the struct klist_node,
      but for the struct we insert into the void * in klist_node,
      which is struct klist.
      
      Reported-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si
      Cc: Bastien ROUCARIES <roucaries.bastien@gmail.com>
      Signed-off-by: default avatarJesper Nilsson <jesper.nilsson@axis.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c0e69a5b
    • Inaky Perez-Gonzalez's avatar
      debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n · 8adb711f
      Inaky Perez-Gonzalez authored
      Toralf Förster <toralf.foerster@gmx.de> reported a build failure in
      the WiMAX stack when CONFIG_DEBUG_FS=n
      
      http://linuxwimax.org/pipermail/wimax/2009-January/000449.html
      
      This is due to debugfs_create_size_t() missing an stub that returns
      -ENODEV when the DEBUGFS subsystem is not configured in (like the rest
      of the debugfs API).
      
      This patch adds said stub.
      Reported-by: default avatarToralf Förster <toralf.foerster@gmx.de>
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8adb711f
    • Greg Kroah-Hartman's avatar
      sysfs: fix problems with binary files · 4503efd0
      Greg Kroah-Hartman authored
      Some sysfs binary files don't like having 0 passed to them as a size.
      Fix this up at the root by just returning to the vfs if userspace asks
      us for a zero sized buffer.
      
      Thanks to Pavel Roskin for pointing this out.
      Reported-by: default avatarPavel Roskin <proski@gnu.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4503efd0
    • Kay Sievers's avatar
      PNP: fix broken pnp lowercasing for acpi module aliases · 72638f59
      Kay Sievers authored
      Based on a patch from Brian, who identified the issue.
      Signed-off-by: default avatarBryan Kadzban <bryan@kadzban.is-a-geek.net>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      72638f59
    • Roland Dreier's avatar
      driver core: Convert '/' to '!' in dev_set_name() · 7143f7a1
      Roland Dreier authored
      Commit 3ada8b7e ("block: struct device - replace bus_id with dev_name(),
      dev_set_name()") deleted the code in register_disk() that changed a '/'
      to a '!' in the device name when registering a disk, but dev_set_name()
      does not perform this conversion.
      
      This leads to amusing problems with disks that have '/' in their names:
      for example a failure to boot with the root partition on a cciss device,
      even though the kernel says it knows about the root device:
      
          VFS: Cannot open root device "cciss/c0d0p6" or unknown-block(0,0)
          Please append a correct "root=" boot option; here are the available partitions:
          6800        71652960 cciss/c0d0 driver: cciss
            6802               1 cciss/c0d0p2
            6805         2931831 cciss/c0d0p5
            6806        34354908 cciss/c0d0p6
          6810        71652960 cciss/c0d1 driver: cciss
      
      Fix this by adding code to change '/' to '!' in dev_set_name() to handle
      this until dev_set_name() is converted to use kobject_set_name().
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      Acked-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7143f7a1
  2. 17 Jan, 2009 5 commits
  3. 16 Jan, 2009 30 commits