1. 15 11月, 2012 3 次提交
  2. 22 10月, 2012 4 次提交
  3. 05 10月, 2012 1 次提交
  4. 04 10月, 2012 1 次提交
    • L
      firmware: teach the kernel to load firmware files directly from the filesystem · abb139e7
      Linus Torvalds 提交于
      This is a first step in allowing people to by-pass udev for loading
      device firmware.  Current versions of udev will deadlock (causing us to
      block for the 30 second timeout) under some circumstances if the
      firmware is loaded as part of the module initialization path, and this
      is causing problems for media drivers in particular.
      
      The current patch hardcodes the firmware path that udev uses by default,
      and will fall back to the legacy udev mode if the firmware cannot be
      found there.  We'd like to add support for both configuring the paths
      and the fallback behaviour, but in the meantime this hopefully fixes the
      immediate problem, while also giving us a way forward.
      
      [ v2: Some VFS layer interface cleanups suggested by Al Viro ]
      [ v3: use the default udev paths suggested by Kay Sievers ]
      Suggested-by: NIvan Kalvachev <ikalvachev@gmail.com>
      Acked-by: NGreg KH <gregkh@linuxfoundation.org>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Kay Sievers <kay@redhat.com>
      Cc: Ming Lei <ming.lei@canonical.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abb139e7
  5. 11 9月, 2012 1 次提交
  6. 07 9月, 2012 2 次提交
  7. 17 8月, 2012 15 次提交
  8. 17 7月, 2012 1 次提交
  9. 29 3月, 2012 5 次提交
  10. 24 1月, 2012 1 次提交
  11. 05 1月, 2012 1 次提交
    • N
      firmware: Fix an oops on reading fw_priv->fw in sysfs loading file · eea915bb
      Neil Horman 提交于
      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: NNeil Horman <nhorman@tuxdriver.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eea915bb
  12. 10 12月, 2011 1 次提交
    • S
      PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled() · b298d289
      Srivatsa S. Bhat 提交于
      Commit a144c6a6 (PM: Print a warning if firmware is requested when tasks
      are frozen) introduced usermodehelper_is_disabled() to warn and exit
      immediately if firmware is requested when usermodehelpers are disabled.
      
      However, it is racy. Consider the following scenario, currently used in
      drivers/base/firmware_class.c:
      
      ...
      if (usermodehelper_is_disabled())
              goto out;
      
      /* Do actual work */
      ...
      
      out:
              return err;
      
      Nothing prevents someone from disabling usermodehelpers just after the check
      in the 'if' condition, which means that it is quite possible to try doing the
      "actual work" with usermodehelpers disabled, leading to undesirable
      consequences.
      
      In particular, this race condition in _request_firmware() causes task freezing
      failures whenever suspend/hibernation is in progress because, it wrongly waits
      to get the firmware/microcode image from userspace when actually the
      usermodehelpers are disabled or userspace has been frozen.
      Some of the example scenarios that cause freezing failures due to this race
      are those that depend on userspace via request_firmware(), such as x86
      microcode module initialization and microcode image reload.
      
      Previous discussions about this issue can be found at:
      http://thread.gmane.org/gmane.linux.kernel/1198291/focus=1200591
      
      This patch adds proper synchronization to fix this issue.
      
      It is to be noted that this patchset fixes the freezing failures but doesn't
      remove the warnings. IOW, it does not attempt to add explicit synchronization
      to x86 microcode driver to avoid requesting microcode image at inopportune
      moments. Because, the warnings were introduced to highlight such cases, in the
      first place. And we need not silence the warnings, since we take care of the
      *real* problem (freezing failure) and hence, after that, the warnings are
      pretty harmless anyway.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      b298d289
  13. 25 8月, 2011 1 次提交
  14. 18 5月, 2011 1 次提交
  15. 04 2月, 2011 1 次提交
  16. 24 8月, 2010 1 次提交