1. 26 Jul, 2010 5 commits
    • Eric W. Biederman's avatar
      sysfs: Don't allow the creation of symlinks we can't remove · 96d6523a
      Eric W. Biederman authored
      Recently my tagged sysfs support revealed a flaw in the device core
      that a few rare drivers are running into such that we don't always put
      network devices in a class subdirectory named net/.
      
      Since we are not creating the class directory the network devices wind
      up in a non-tagged directory, but the symlinks to the network devices
      from /sys/class/net are in a tagged directory.  All of which works
      until we go to remove or rename the symlink.  When we remove or rename
      a symlink we look in the namespace of the target of the symlink.
      Since the target of the symlink is in a non-tagged sysfs directory we
      don't have a namespace to look in, and we fail to remove the symlink.
      
      Detect this problem up front and simply don't create symlinks we won't
      be able to remove later.  This prevents symlink leakage and fails in
      a much clearer and more understandable way.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      96d6523a
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · dbbe4649
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        ACPI / Sleep: Allow the NVS saving to be skipped during suspend to RAM
        ACPI: create "processor.bm_check_disable" boot param
        ACPI: skip checking BM_STS if the BIOS doesn't ask for it
        ACPI: fix unused function warning
        ACPI: processor: fix processor_physically_present on UP
        ACPI video: fix string mismatch for Sony SR290 laptop
        ACPI battery: don't invoke power_supply_changed twice when battery is hot-added
        ACPI: handle systems which asynchoronously enable ACPI mode
      dbbe4649
    • Eric W. Biederman's avatar
      Driver-core: Always create class directories for classses that support namespaces. · 24b1442d
      Eric W. Biederman authored
      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: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reported-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24b1442d
    • Michael S. Tsirkin's avatar
      virtio: fix oops on OOM · 1fe9b6fe
      Michael S. Tsirkin authored
      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: default avatarChris Mason <chris.mason@oracle.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Tested-by: default avatarChris Mason <chris.mason@oracle.com>
      Cc: stable@kernel.org # .34.x
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1fe9b6fe
    • Dmitry Torokhov's avatar
      Input: RX51 keymap - fix recent compile breakage · 2e65a207
      Dmitry Torokhov authored
      Commit 3fea6026 ("Input: twl40300-keypad - fix handling of "all
      ground" rows") broke compilation as I managed to use non-existent
      keycodes.
      Reported-by: default avatarArjan van de Ven <arjan@infradead.org>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2e65a207
  2. 25 Jul, 2010 2 commits
  3. 23 Jul, 2010 9 commits
  4. 22 Jul, 2010 24 commits