Skip to content
Snippets Groups Projects
  1. Nov 19, 2006
  2. Sep 18, 2006
  3. Sep 06, 2006
    • Sonny Rao's avatar
      idr: fix race in idr code · eebf6e7f
      Sonny Rao authored
      
      I ran into a bug where the kernel died in the idr code:
      
      cpu 0x1d: Vector: 300 (Data Access) at [c000000b7096f710]
          pc: c0000000001f8984: .idr_get_new_above_int+0x140/0x330
          lr: c0000000001f89b4: .idr_get_new_above_int+0x170/0x330
          sp: c000000b7096f990
         msr: 800000000000b032
         dar: 0
       dsisr: 40010000
        current = 0xc000000b70d43830
        paca    = 0xc000000000556900
          pid   = 2022, comm = hwup
      1d:mon> t
      [c000000b7096f990] c0000000000d2ad8 .expand_files+0x2e8/0x364 (unreliable)
      [c000000b7096faa0] c0000000001f8bf8 .idr_get_new_above+0x18/0x68
      [c000000b7096fb20] c00000000002a054 .init_new_context+0x5c/0xf0
      [c000000b7096fbc0] c000000000049dc8 .copy_process+0x91c/0x1404
      [c000000b7096fcd0] c00000000004a988 .do_fork+0xd8/0x224
      [c000000b7096fdc0] c00000000000ebdc .sys_clone+0x5c/0x74
      [c000000b7096fe30] c000000000008950 .ppc_clone+0x8/0xc
      -- Exception: c00 (System Call) at 000000000fde887c
      SP (f8b4e7a0) is in userspace
      
      Turned out to be a race-condition and NULL ptr deref, here's my fix:
      
      Users of the idr code are supposed to call idr_pre_get without locking, so the
      idr code must serialize itself with respect to layer allocations.  However, it
      fails to do so in an error path in idr_get_new_above_int().  I added the
      missing locking to fix this.
      
      Signed-off-by: default avatarSonny Rao <sonny@burdell.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      eebf6e7f
  4. Feb 22, 2006
    • Greg Kroah-Hartman's avatar
      Revert mount/umount uevent removal · fa675765
      Greg Kroah-Hartman authored
      
      This change reverts the 033b96fd commit
      from Kay Sievers that removed the mount/umount uevents from the kernel.
      Some older versions of HAL still depend on these events to detect when a
      new device has been mounted.  These events are not correctly emitted,
      and are broken by design, and so, should not be relied upon by any
      future program.  Instead, the /proc/mounts file should be polled to
      properly detect this kind of event.
      
      A feature-removal-schedule.txt entry has been added, noting when this
      interface will be removed from the kernel.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fa675765
  5. Feb 18, 2006
  6. Feb 16, 2006
    • NeilBrown's avatar
      [PATCH] Fix over-zealous tag clearing in radix_tree_delete · 90f9dd8f
      NeilBrown authored
      
      If a tag is set for a node being deleted from a radix_tree, then that
      tag gets cleared from the parent of the node, even if it is set for some
      siblings of the node begin deleted.
      
      This patch changes the logic to include a test for any_tag_set similar
      to the logic a little futher down.  Care is taken to ensure that
      'nr_cleared_tags' remains equals to the number of entries in the 'tags'
      array which are set to '0' (which means that this tag is not set in the
      tree below pathp->node, and should be cleared at pathp->node and
      possibly above.
      
      [ Nick says: "Linus FYI, I was able to modify the radix tree test
        harness to catch the bug and can no longer trigger it after the fix.
        Resulting code passes all other harness tests as well of course." ]
      
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      90f9dd8f
  7. Feb 07, 2006
  8. Feb 06, 2006
  9. Feb 03, 2006
  10. Feb 02, 2006
  11. Feb 01, 2006
    • Bryan O'Sullivan's avatar
      [PATCH] Introduce __iowrite32_copy · c27a0d75
      Bryan O'Sullivan authored
      
      This arch-independent routine copies data to a memory-mapped I/O region,
      using 32-bit accesses.  The naming is double-underscored to make it clear
      that it does not guarantee write ordering, nor does it perform a memory
      barrier afterwards; the kernel doc also explicitly states this.  This style
      of access is required by some devices.
      
      This change also introduces include/linux/io.h, at Andrew's suggestion.  It
      only has one occupant at the moment, but is a logical destination for
      oft-replicated contents of include/asm-*/{io,iomap}.h to migrate to.
      
      Signed-off-by: default avatarBryan O'Sullivan <bos@pathscale.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c27a0d75
  12. Jan 14, 2006
  13. Jan 11, 2006
    • Muli Ben-Yehuda's avatar
      [PATCH] x86_64: Use function pointers to call DMA mapping functions · 17a941d8
      Muli Ben-Yehuda authored
      
      AK: I hacked Muli's original patch a lot and there were a lot
      of changes - all bugs are probably to blame on me now.
      There were also some changes in the fall back behaviour
      for swiotlb - in particular it doesn't try to use GFP_DMA
      now anymore. Also all DMA mapping operations use the
      same core dma_alloc_coherent code with proper fallbacks now.
      And various other changes and cleanups.
      
      Known problems: iommu=force swiotlb=force together breaks
                      needs more testing.
      
      This patch cleans up x86_64's DMA mapping dispatching code. Right now
      we have three possible IOMMU types: AGP GART, swiotlb and nommu, and
      in the future we will also have Xen's x86_64 swiotlb and other HW
      IOMMUs for x86_64. In order to support all of them cleanly, this
      patch:
      
      - introduces a struct dma_mapping_ops with function pointers for each
        of the DMA mapping operations of gart (AMD HW IOMMU), swiotlb
        (software IOMMU) and nommu (no IOMMU).
      
      - gets rid of:
      
        if (swiotlb)
            return swiotlb_xxx();
      
      - PCI_DMA_BUS_IS_PHYS is now checked against the dma_ops being set
      This makes swiotlb faster by avoiding double copying in some cases.
      
      Signed-Off-By: default avatarMuli Ben-Yehuda <mulix@mulix.org>
      Signed-Off-By: default avatarJon D. Mason <jdmason@us.ibm.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      17a941d8
  14. Jan 10, 2006
  15. Jan 09, 2006
  16. Jan 08, 2006
  17. Jan 06, 2006
  18. Jan 04, 2006
    • akpm@osdl.org's avatar
      [PATCH] kobject_uevent CONFIG_NET=n fix · f743ca5e
      akpm@osdl.org authored
      
      lib/lib.a(kobject_uevent.o)(.text+0x25f): In function `kobject_uevent':
      : undefined reference to `__alloc_skb'
      lib/lib.a(kobject_uevent.o)(.text+0x2a1): In function `kobject_uevent':
      : undefined reference to `skb_over_panic'
      lib/lib.a(kobject_uevent.o)(.text+0x31d): In function `kobject_uevent':
      : undefined reference to `skb_over_panic'
      lib/lib.a(kobject_uevent.o)(.text+0x356): In function `kobject_uevent':
      : undefined reference to `netlink_broadcast'
      lib/lib.a(kobject_uevent.o)(.init.text+0x9): In function `kobject_uevent_init':
      : undefined reference to `netlink_kernel_create'
      make: *** [.tmp_vmlinux1] Error 1
      
      Netlink is unconditionally enabled if CONFIG_NET, so that's OK.
      
      kobject_uevent.o is compiled even if !CONFIG_HOTPLUG, which is lazy.
      
      Let's compound the sin.
      
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f743ca5e
    • Frank Pavlic's avatar
      [PATCH] klist: Fix broken kref counting in find functions · e22dafbc
      Frank Pavlic authored
      
      The klist reference counting in the find functions that use
      klist_iter_init_node is broken.  If the function (for example
      driver_find_device) is called with a NULL start object then everything is
      fine, the first call to next_device()/klist_next increases the ref-count of
      the first node on the list and does nothing for the start object which is
      NULL.
      
      If they are called with a valid start object then klist_next will decrement
      the ref-count for the start object but nobody has incremented it.  Logical
      place to fix this would be klist_iter_init_node because the function puts a
      reference of the object into the klist_iter struct.
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarFrank Pavlic <pavlic@de.ibm.com>
      Cc: Patrick Mochel <mochel@digitalimplant.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e22dafbc
    • Kay Sievers's avatar
      [PATCH] driver core: replace "hotplug" by "uevent" · 312c004d
      Kay Sievers authored
      
      Leave the overloaded "hotplug" word to susbsystems which are handling
      real devices. The driver core does not "plug" anything, it just exports
      the state to userspace and generates events.
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      312c004d
    • Kay Sievers's avatar
      [PATCH] merge kobject_uevent and kobject_hotplug · 5f123fbd
      Kay Sievers authored
      
      The distinction between hotplug and uevent does not make sense these
      days, netlink events are the default.
      
      udev depends entirely on netlink uevents. Only during early boot and
      in initramfs, /sbin/hotplug is needed. So merge the two functions and
      provide only one interface without all the options.
      
      The netlink layer got a nice generic interface with named slots
      recently, which is probably a better facility to plug events for
      subsystem specific events.
      Also the new poll() interface to /proc/mounts is a nicer way to
      notify about changes than sending events through the core.
      The uevents should only be used for driver core related requests to
      userspace now.
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5f123fbd
    • Kay Sievers's avatar
      [PATCH] remove mount/umount uevents from superblock handling · 033b96fd
      Kay Sievers authored
      
      The names of these events have been confusing from the beginning
      on, as they have been more like claim/release events. We needed these
      events for noticing HAL if storage devices have been mounted.
      
      Thanks to Al, we have the proper solution now and can poll()
      /proc/mounts instead to get notfied about mount tree changes.
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      033b96fd
    • Kay Sievers's avatar
      [PATCH] remove CONFIG_KOBJECT_UEVENT option · 0296b228
      Kay Sievers authored
      
      It makes zero sense to have hotplug, but not the netlink
      events enabled today. Remove this option and merge the
      kobject_uevent.h header into the kobject.h header file.
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0296b228
  19. Dec 20, 2005
  20. Nov 28, 2005
  21. Nov 07, 2005
Loading