1. 06 Jan, 2012 1 commit
  2. 05 Jan, 2012 2 commits
    • Neil Horman's avatar
      firmware: Fix an oops on reading fw_priv->fw in sysfs loading file · eea915bb
      Neil Horman authored
      This oops was reported recently:
      firmware_loading_store+0xf9/0x17b
      dev_attr_store+0x20/0x22
      sysfs_write_file+0x101/0x134
      vfs_write+0xac/0xf3
      sys_write+0x4a/0x6e
      system_call_fastpath+0x16/0x1b
      
      The complete backtrace was unfortunately not captured, but details can be found
      here:
      https://bugzilla.redhat.com/show_bug.cgi?id=769920
      
      The cause is fairly clear.
      
      Its caused by the fact that firmware_loading_store has a case 0 in its
      switch statement that reads and writes the fw_priv->fw poniter without the
      protection of the fw_lock mutex.  since there is a window between the time that
      _request_firmware sets fw_priv->fw to NULL and the time the corresponding sysfs
      file is unregistered, its possible for a user space application to race in, and
      write a zero to the loading file, causing a NULL dereference in
      firmware_loading_store.  Fix it by extending the protection of the fw_lock mutex
      to cover all of the firware_loading_store function.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      eea915bb
    • K. Y. Srinivasan's avatar
      Drivers:hv: Fix a bug in vmbus_driver_unregister() · 8f257a14
      K. Y. Srinivasan authored
      The function vmbus_exists() was introduced recently to deal with cases where
      the vmbus driver failed to initialize and yet other Hyper-V drivers attempted
      to register with the vmbus bus driver. This patch introduced a bug where
      vmbus_driver_unregister() would fail to unregister the driver. This patch
      fixes the problem.
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarFuzhou Chen <fuzhouch@microsoft.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8f257a14
  3. 04 Jan, 2012 2 commits
  4. 22 Dec, 2011 4 commits
    • Greg Kroah-Hartman's avatar
      arm: time.h: remove device.h #include · a87b5b1c
      Greg Kroah-Hartman authored
      According to Russell King, this isn't needed anymore, so just remove it.
      Reported-by: default avatarRussell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Boojin Kim <boojin.kim@samsung.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a87b5b1c
    • Kay Sievers's avatar
      driver-core: remove sysdev.h usage. · edbaa603
      Kay Sievers authored
      The sysdev.h file should not be needed by any in-kernel code, so remove
      the .h file from these random files that seem to still want to include
      it.
      
      The sysdev code will be going away soon, so this include needs to be
      removed no matter what.
      
      Cc: Jiandong Zheng <jdzheng@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "Venkatesh Pallipadi
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      edbaa603
    • Kay Sievers's avatar
      clockevents: remove sysdev.h · 7239f65c
      Kay Sievers authored
      This isn't needed in the clockevents.c file, and the header file is
      going away soon, so just remove the #include
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7239f65c
    • Kay Sievers's avatar
      arm: convert sysdev_class to a regular subsystem · 4a858cfc
      Kay Sievers authored
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Boojin Kim <boojin.kim@samsung.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4a858cfc
  5. 21 Dec, 2011 13 commits
  6. 15 Dec, 2011 1 commit
  7. 14 Dec, 2011 7 commits
  8. 13 Dec, 2011 3 commits
    • Peter Zijlstra's avatar
      kref: Remove the memory barriers · 3c8ed889
      Peter Zijlstra authored
      Commit 1b0b3b99 ("kref: fix CPU ordering with respect to krefs")
      wrongly adds memory barriers to kref.
      
      It states:
      
        some atomic operations are only atomic, not ordered. Thus a CPU is allowed
        to reorder memory references to an object to before the reference is
        obtained. This fixes it.
      
      While true, it fails to show why this is a problem. I say it is not a
      problem because if there is a race with kref_put() such that we could
      end up referencing a free'd object without this memory barrier, we
      would still have that race with the memory barrier.
      
      The kref_put() in question could complete (and free the object) before
      the atomic_inc() and we'd still be up shit creek.
      
      The kref_init() case is even worse, if your object is published at this
      time you're so wrong the memory barrier won't make a difference what
      so ever. If its not published, the act of publishing should include
      the needed barriers/locks to make sure all writes prior to the act of
      publishing are complete such that others will only observe a complete
      object.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3c8ed889
    • Peter Zijlstra's avatar
      kref: Implement kref_put in terms of kref_sub · 47dbd7d9
      Peter Zijlstra authored
      Less lines of code is better.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      47dbd7d9
    • Peter Zijlstra's avatar
      kref: Inline all functions · 4af679cd
      Peter Zijlstra authored
      These are tiny functions, there's no point in having them out-of-line.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-8eccvi2ur2fzgi00xdjlbf5z@git.kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4af679cd
  9. 12 Dec, 2011 5 commits
  10. 10 Dec, 2011 2 commits