1. 26 7月, 2010 3 次提交
    • E
      Driver-core: Always create class directories for classses that support namespaces. · 24b1442d
      Eric W. Biederman 提交于
      This fixes the regression in 2.6.35-rcX where bluetooth network devices
      would fail to be deleted from sysfs, causing their destruction and
      recreation to fail.  In addition this fixes the mac80211_hwsim driver
      where it would leave around sysfs files when the driver was removed.
      
      This problem is discussed at
        https://bugzilla.kernel.org/show_bug.cgi?id=16257
      
      The reason for the regression is that the network namespace support
      added to sysfs expects and requires that network devices be put in
      directories that can contain only network devices.
      
      Today get_device_parent almost provides that guarantee for all class
      devices, except for a specific exception when the parent of a class
      devices is a class device.  It would be nice to simply remove that
      arguably incorrect special case, but apparently the input devices depend
      on it being there.  So I have only removed it for class devices with
      network namespace support.  Which today are the network devices.
      
      It has been suggested that a better fix would be to change the parent
      device from a class device to a bus device, which in the case of the
      bluetooth driver would change /sys/class/bluetooth to /sys/bus/bluetoth,
      I can not see how we would avoid significant userspace breakage if we
      were to make that change.
      
      Adding an extra directory in the path to the device will also be
      userspace visible but it is much less likely to break things.
      Everything is still accessible from /sys/class (for example), and it
      fixes two bugs.  Adding an extra directory fixes a 3 year old regression
      introduced with the new sysfs layout that makes it impossible to rename
      bnep0 network devices to names that conflict with hci device attributes
      like hci_revsion.  Adding an additional directory removes the new
      failure modes introduced by the network namespace code.
      
      If it weren't for the regession in the renaming of network devices I
      would figure out how to just make the sysfs code deal with this
      configuration of devices.
      
      In summary this patch fixes regressions by changing:
      "/sys/class/bluetooth/hci0/bnep0" to "/sys/class/bluetooth/hci0/net/bnep0".
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Reported-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24b1442d
    • M
      virtio: fix oops on OOM · 1fe9b6fe
      Michael S. Tsirkin 提交于
      virtio ring was changed to return an error code on OOM,
      but one caller was missed and still checks for vq->vring.num.
      The fix is just to check for <0 error code.
      
      Long term it might make sense to change goto add_head to
      just return an error on oom instead, but let's apply
      a minimal fix for 2.6.35.
      Reported-by: NChris Mason <chris.mason@oracle.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Tested-by: NChris Mason <chris.mason@oracle.com>
      Cc: stable@kernel.org # .34.x
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1fe9b6fe
    • D
      Input: RX51 keymap - fix recent compile breakage · 2e65a207
      Dmitry Torokhov 提交于
      Commit 3fea6026 ("Input: twl40300-keypad - fix handling of "all
      ground" rows") broke compilation as I managed to use non-existent
      keycodes.
      Reported-by: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e65a207
  2. 24 7月, 2010 3 次提交
  3. 23 7月, 2010 18 次提交
  4. 22 7月, 2010 16 次提交