1. 14 Mar, 2013 15 commits
  2. 03 Mar, 2013 25 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.8.2 · 19b00d2d
      Greg Kroah-Hartman authored
      19b00d2d
    • Dave Chinner's avatar
      xfs: xfs_bmap_add_attrfork_local is too generic · 2cd182d6
      Dave Chinner authored
      commit 1e82379b upstream.
      
      When we are converting local data to an extent format as a result of
      adding an attribute, the type of data contained in the local fork
      determines the behaviour that needs to occur.
      
      xfs_bmap_add_attrfork_local() already handles the directory data
      case specially by using S_ISDIR() and calling out to
      xfs_dir2_sf_to_block(), but with verifiers we now need to handle
      each different type of metadata specially and different metadata
      formats require different verifiers (and eventually block header
      initialisation).
      
      There is only a single place that we add and attribute fork to
      the inode, but that is in the attribute code and it knows nothing
      about the specific contents of the data fork. It is only the case of
      local data that is the issue here, so adding code to hadnle this
      case in the attribute specific code is wrong. Hence we are really
      stuck trying to detect the data fork contents in
      xfs_bmap_add_attrfork_local() and performing the correct callout
      there.
      
      Luckily the current cases can be determined by S_IS* macros, and we
      can push the work off to data specific callouts, but each of those
      callouts does a lot of work in common with
      xfs_bmap_local_to_extents(). The only reason that this fails for
      symlinks right now is is that xfs_bmap_local_to_extents() assumes
      the data fork contains extent data, and so attaches a a bmap extent
      data verifier to the buffer and simply copies the data fork
      information straight into it.
      
      To fix this, allow us to pass a "formatting" callback into
      xfs_bmap_local_to_extents() which is responsible for setting the
      buffer type, initialising it and copying the data fork contents over
      to the new buffer. This allows callers to specify how they want to
      format the new buffer (which is necessary for the upcoming CRC
      enabled metadata blocks) and hence make xfs_bmap_local_to_extents()
      useful for any type of data fork content.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      2cd182d6
    • Matt Fleming's avatar
      efivarfs: guid part of filenames are case-insensitive · 688289c4
      Matt Fleming authored
      commit da27a243 upstream.
      
      It makes no sense to treat the following filenames as unique,
      
      	VarName-abcdefab-abcd-abcd-abcd-abcdefabcdef
      	VarName-ABCDEFAB-ABCD-ABCD-ABCD-ABCDEFABCDEF
      	VarName-ABcDEfAB-ABcD-ABcD-ABcD-ABcDEfABcDEf
      	VarName-aBcDEfAB-aBcD-aBcD-aBcD-aBcDEfaBcDEf
      	... etc ...
      
      since the guid will be converted into a binary representation, which
      has no case.
      
      Roll our own dentry operations so that we can treat the variable name
      part of filenames ("VarName" in the above example) as case-sensitive,
      but the guid portion as case-insensitive. That way, efivarfs will
      refuse to create the above files if any one already exists.
      Reported-by: default avatarLingzhu Xiang <lxiang@redhat.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      688289c4
    • Matt Fleming's avatar
      efivarfs: Validate filenames much more aggressively · 70afdfc6
      Matt Fleming authored
      commit 47f531e8 upstream.
      
      The only thing that efivarfs does to enforce a valid filename is
      ensure that the name isn't too short. We need to strongly sanitise any
      filenames, not least because variable creation is delayed until
      efivarfs_file_write(), which means we can't rely on the firmware to
      inform us of an invalid name, because if the file is never written to
      we'll never know it's invalid.
      
      Perform a couple of steps before agreeing to create a new file,
      
        * hex_to_bin() returns a value indicating whether or not it was able
          to convert its arguments to a binary representation - we should
          check it.
      
        * Ensure that the GUID portion of the filename is the correct length
          and format.
      
        * The variable name portion of the filename needs to be at least one
          character in size.
      Reported-by: default avatarLingzhu Xiang <lxiang@redhat.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      70afdfc6
    • Thomas Renninger's avatar
      ACPI: Overriding ACPI tables via initrd only works with an initrd and on X86 · 595aa2af
      Thomas Renninger authored
      commit 565d956a upstream.
      
      Reflect this dependency in Kconfig, to prevent build failures.
      
      Shorten the config description as suggested by Borislav Petkov.
      
      Finding a suitable memory area to store the modified table(s) has been
      taken over from arch/x86/kernel/setup.c and makes use of max_low_pfn_mapped:
      memblock_find_in_range(0, max_low_pfn_mapped,...)
      This one is X86 specific. It may not be hard to extend this functionality
      for other ACPI aware architectures if there is need for.
      
      For now make this feature only available for X86 to avoid build failures on
      IA64, compare with:
      https://bugzilla.kernel.org/show_bug.cgi?id=54091Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Link: http://lkml.kernel.org/r/1361538742-67599-3-git-send-email-trenn@suse.deSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      595aa2af
    • Lee, Chun-Yi's avatar
      x86, efi: Allow slash in file path of initrd · c5d6774c
      Lee, Chun-Yi authored
      commit deb94101 upstream.
      
      When initrd file didn't put at the same place with stub kernel, we
      need give the file path of initrd, but need use backslash to separate
      directory and file. It's not friendly to unix/linux user, and not so
      intuitive for bootloader forward paramters to efi stub kernel by
      chainloading.
      
      This patch add support to handle_ramdisks for allow slash in file path
      of initrd, it convert slash to backlash when parsing path.
      
      In additional, this patch also separates print code of efi_char16_t from
      efi_printk, and print out the path/filename of initrd when failed to open
      initrd file. It's good for debug and discover typo.
      Signed-off-by: default avatarLee, Chun-Yi <jlee@suse.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5d6774c
    • Alexey Klimov's avatar
      usb hid quirks for Masterkit MA901 usb radio · 9b48ad4a
      Alexey Klimov authored
      commit 0322bd39 upstream.
      
      Don't let Masterkit MA901 USB radio be handled by usb hid drivers.
      This device will be handled by radio-ma901.c driver.
      Signed-off-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
      Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b48ad4a
    • James Ralston's avatar
      ahci: Add Device IDs for Intel Wellsburg PCH · 58a24bbc
      James Ralston authored
      commit 151743fd upstream.
      
      This patch adds the AHCI-mode SATA Device IDs for the Intel Wellsburg PCH
      Signed-off-by: default avatarJames Ralston <james.d.ralston@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58a24bbc
    • Seth Heasley's avatar
      ahci: AHCI-mode SATA patch for Intel Avoton DeviceIDs · f5248a1f
      Seth Heasley authored
      commit 29e674dd upstream.
      
      This patch adds the AHCI and RAID-mode SATA DeviceIDs for the Intel Avoton SOC.
      Signed-off-by: default avatarSeth Heasley <seth.heasley@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5248a1f
    • James Ralston's avatar
      ata_piix: Add Device IDs for Intel Wellsburg PCH · 19be8a03
      James Ralston authored
      commit 3aee8bc5 upstream.
      
      This patch adds the IDE-mode SATA Device IDs for the Intel Wellsburg PCH
      Signed-off-by: default avatarJames Ralston <james.d.ralston@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19be8a03
    • Seth Heasley's avatar
      ata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs · 1b6a883f
      Seth Heasley authored
      commit aaa51527 upstream.
      
      This patch adds the IDE-mode SATA DeviceIDs for the Intel Avoton SOC.
      Signed-off-by: default avatarSeth Heasley <seth.heasley@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b6a883f
    • Ian Abbott's avatar
      staging: comedi: check s->async for poll(), read() and write() · 9cb9a591
      Ian Abbott authored
      commit cc400e18 upstream.
      
      Some low-level comedi drivers (incorrectly) point `dev->read_subdev` or
      `dev->write_subdev` to a subdevice that does not support asynchronous
      commands.  Comedi's poll(), read() and write() file operation handlers
      assume these subdevices do support asynchronous commands.  In
      particular, they assume `s->async` is valid (where `s` points to the
      read or write subdevice), which it won't be if it has been set
      incorrectly.  This can lead to a NULL pointer dereference.
      
      Check `s->async` is non-NULL in `comedi_poll()`, `comedi_read()` and
      `comedi_write()` to avoid the bug.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9cb9a591
    • Joseph Salisbury's avatar
      ACPI: Add DMI entry for Sony VGN-FW41E_H · 30f3a0a7
      Joseph Salisbury authored
      commit 66f2fda9 upstream.
      
      This patch adds a quirk to allow the Sony VGN-FW41E_H to suspend/resume
      properly.
      
      References: http://bugs.launchpad.net/bugs/1113547Signed-off-by: default avatarJoseph Salisbury <joseph.salisbury@canonical.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      30f3a0a7
    • Rajanikanth H.V's avatar
      ab8500_btemp: Demote initcall sequence · 15642204
      Rajanikanth H.V authored
      commit eeb0751c upstream.
      
      Power supply subsystem creates thermal zone device for the property
      'POWER_SUPPLY_PROP_TEMP' which requires thermal subsystem to be ready
      before 'ab8500 battery temperature monitor' driver is initialized. ab8500
      btemp driver is initialized with subsys_initcall whereas thermal subsystem
      is initialized with fs_initcall which causes
      thermal_zone_device_register(...) to crash since the required structure
      'thermal_class' is not initialized yet:
      
      Unable to handle kernel NULL pointer dereference at virtual address 000000a4
      pgd = c0004000
      [000000a4] *pgd=00000000
      Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0    Tainted: G        W     (3.8.0-rc4-00001-g632fda8-dirty #1)
      PC is at _raw_spin_lock+0x18/0x54
      LR is at get_device_parent+0x50/0x1b8
      pc : [<c02f1dd0>]    lr : [<c01cb248>]    psr: 60000013
      sp : ef04bdc8  ip : 00000000  fp : c0446180
      r10: ef216e38  r9 : c03af5d0  r8 : ef275c18
      r7 : 00000000  r6 : c0476c14  r5 : ef275c18  r4 : ef095840
      r3 : ef04a000  r2 : 00000001  r1 : 00000000  r0 : 000000a4
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5787d  Table: 0000404a  DAC: 00000015
      Process swapper/0 (pid: 1, stack limit = 0xef04a238)
      Stack: (0xef04bdc8 to 0xef04c000)
      [...]
      [<c02f1dd0>] (_raw_spin_lock+0x18/0x54) from [<c01cb248>] (get_device_parent+0x50/0x1b8)
      [<c01cb248>] (get_device_parent+0x50/0x1b8) from [<c01cb8d8>] (device_add+0xa4/0x574)
      [<c01cb8d8>] (device_add+0xa4/0x574) from [<c020b91c>] (thermal_zone_device_register+0x118/0x938)
      [<c020b91c>] (thermal_zone_device_register+0x118/0x938) from [<c0202030>] (power_supply_register+0x170/0x1f8)
      [<c0202030>] (power_supply_register+0x170/0x1f8) from [<c02055ec>] (ab8500_btemp_probe+0x208/0x47c)
      [<c02055ec>] (ab8500_btemp_probe+0x208/0x47c) from [<c01cf0dc>] (platform_drv_probe+0x14/0x18)
      [<c01cf0dc>] (platform_drv_probe+0x14/0x18) from [<c01cde70>] (driver_probe_device+0x74/0x20c)
      [<c01cde70>] (driver_probe_device+0x74/0x20c) from [<c01ce094>] (__driver_attach+0x8c/0x90)
      [<c01ce094>] (__driver_attach+0x8c/0x90) from [<c01cc640>] (bus_for_each_dev+0x4c/0x80)
      [<c01cc640>] (bus_for_each_dev+0x4c/0x80) from [<c01cd6b4>] (bus_add_driver+0x16c/0x23c)
      [<c01cd6b4>] (bus_add_driver+0x16c/0x23c) from [<c01ce54c>] (driver_register+0x78/0x14c)
      [<c01ce54c>] (driver_register+0x78/0x14c) from [<c00086ac>] (do_one_initcall+0xfc/0x164)
      [<c00086ac>] (do_one_initcall+0xfc/0x164) from [<c02e89c8>] (kernel_init+0x120/0x2b8)
      [<c02e89c8>] (kernel_init+0x120/0x2b8) from [<c000e358>] (ret_from_fork+0x14/0x3c)
      Code: e3c3303f e5932004 e2822001 e5832004 (e1903f9f)
      ---[ end trace ed9df72941b5bada ]---
      Signed-off-by: default avatarRajanikanth H.V <rajanikanth.hv@stericsson.com>
      Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      15642204
    • Lee Jones's avatar
      ab8500-chargalg: Only root should have write permission on sysfs file · 71b9101a
      Lee Jones authored
      commit e3455002 upstream.
      
      Only root should have write permission on sysfs file ab8500_chargalg/chargalg.
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71b9101a
    • NeilBrown's avatar
      bq27x00_battery: Fix bugs introduced with BQ27425 support · eddf61b2
      NeilBrown authored
      commit bde83b9a upstream.
      
      commit a66f59ba
      
          bq27x00_battery: Add support for BQ27425 chip
      
      introduced 2 bugs.
      
      1/ 'chip' was set to BQ27425 unconditionally - breaking support for
         other devices;
      
      2/ BQ27425 does not support cycle count, how the code still tries to
         get the cycle count for BQ27425, and now does it twice for other chips.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: Saranya Gopal <saranya.gopal@intel.com>
      Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eddf61b2
    • Li Zefan's avatar
      cgroup: fix exit() vs rmdir() race · ec463f0c
      Li Zefan authored
      commit 71b5707e upstream.
      
      In cgroup_exit() put_css_set_taskexit() is called without any lock,
      which might lead to accessing a freed cgroup:
      
      thread1                           thread2
      ---------------------------------------------
      exit()
        cgroup_exit()
          put_css_set_taskexit()
            atomic_dec(cgrp->count);
                                         rmdir();
            /* not safe !! */
            check_for_release(cgrp);
      
      rcu_read_lock() can be used to make sure the cgroup is alive.
      Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ec463f0c
    • Li Zefan's avatar
      cpuset: fix cpuset_print_task_mems_allowed() vs rename() race · b19c8d0b
      Li Zefan authored
      commit 63f43f55 upstream.
      
      rename() will change dentry->d_name. The result of this race can
      be worse than seeing partially rewritten name, but we might access
      a stale pointer because rename() will re-allocate memory to hold
      a longer name.
      
      It's safe in the protection of dentry->d_lock.
      
      v2: check NULL dentry before acquiring dentry lock.
      Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b19c8d0b
    • Seiji Aguchi's avatar
      pstore: Avoid deadlock in panic and emergency-restart path · 225234a2
      Seiji Aguchi authored
      commit 9f244e9c upstream.
      
      [Issue]
      
      When pstore is in panic and emergency-restart paths, it may be blocked
      in those paths because it simply takes spin_lock.
      
      This is an example scenario which pstore may hang up in a panic path:
      
       - cpuA grabs psinfo->buf_lock
       - cpuB panics and calls smp_send_stop
       - smp_send_stop sends IRQ to cpuA
       - after 1 second, cpuB gives up on cpuA and sends an NMI instead
       - cpuA is now in an NMI handler while still holding buf_lock
       - cpuB is deadlocked
      
      This case may happen if a firmware has a bug and
      cpuA is stuck talking with it more than one second.
      
      Also, this is a similar scenario in an emergency-restart path:
      
       - cpuA grabs psinfo->buf_lock and stucks in a firmware
       - cpuB kicks emergency-restart via either sysrq-b or hangcheck timer.
         And then, cpuB is deadlocked by taking psinfo->buf_lock again.
      
      [Solution]
      
      This patch avoids the deadlocking issues in both panic and emergency_restart
      paths by introducing a function, is_non_blocking_path(), to check if a cpu
      can be blocked in current path.
      
      With this patch, pstore is not blocked even if another cpu has
      taken a spin_lock, in those paths by changing from spin_lock_irqsave
      to spin_trylock_irqsave.
      
      In addition, according to a comment of emergency_restart() in kernel/sys.c,
      spin_lock shouldn't be taken in an emergency_restart path to avoid
      deadlock. This patch fits the comment below.
      
      <snip>
      /**
       *      emergency_restart - reboot the system
       *
       *      Without shutting down any hardware or taking any locks
       *      reboot the system.  This is called when we know we are in
       *      trouble so this is our best effort to reboot.  This is
       *      safe to call in interrupt context.
       */
      void emergency_restart(void)
      <snip>
      Signed-off-by: default avatarSeiji Aguchi <seiji.aguchi@hds.com>
      Acked-by: default avatarDon Zickus <dzickus@redhat.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Cc: CAI Qian <caiqian@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      225234a2
    • Tejun Heo's avatar
      workqueue: consider work function when searching for busy work items · e50e7d63
      Tejun Heo authored
      commit a2c1c57b upstream.
      
      To avoid executing the same work item concurrenlty, workqueue hashes
      currently busy workers according to their current work items and looks
      up the the table when it wants to execute a new work item.  If there
      already is a worker which is executing the new work item, the new item
      is queued to the found worker so that it gets executed only after the
      current execution finishes.
      
      Unfortunately, a work item may be freed while being executed and thus
      recycled for different purposes.  If it gets recycled for a different
      work item and queued while the previous execution is still in
      progress, workqueue may make the new work item wait for the old one
      although the two aren't really related in any way.
      
      In extreme cases, this false dependency may lead to deadlock although
      it's extremely unlikely given that there aren't too many self-freeing
      work item users and they usually don't wait for other work items.
      
      To alleviate the problem, record the current work function in each
      busy worker and match it together with the work item address in
      find_worker_executing_work().  While this isn't complete, it ensures
      that unrelated work items don't interact with each other and in the
      very unlikely case where a twisted wq user triggers it, it's always
      onto itself making the culprit easy to spot.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarAndrey Isakov <andy51@gmx.ru>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51701
      Cc: stable@vger.kernel.org
      e50e7d63
    • Miklos Szeredi's avatar
      fuse: don't WARN when nlink is zero · c205ae0e
      Miklos Szeredi authored
      commit dfca7ceb upstream.
      
      drop_nlink() warns if nlink is already zero.  This is triggerable by a buggy
      userspace filesystem.  The cure, I think, is worse than the disease so disable
      the warning.
      Reported-by: default avatarTero Roponen <tero.roponen@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c205ae0e
    • Fernando Luis Vázquez Cao's avatar
      HID: clean up quirk for Sony RF receivers · d62365d1
      Fernando Luis Vázquez Cao authored
      commit 99d24902 upstream.
      
      Document what the fix-up is does and make it more robust by ensuring
      that it is only applied to the USB interface that corresponds to the
      mouse (sony_report_fixup() is called once per interface during probing).
      Signed-off-by: default avatarFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d62365d1
    • Fernando Luis Vázquez Cao's avatar
      HID: add support for Sony RF receiver with USB product id 0x0374 · 9637341b
      Fernando Luis Vázquez Cao authored
      commit a4649184 upstream.
      
      Some Vaio desktop computers, among them the VGC-LN51JGB multimedia PC, have
      a RF receiver, multi-interface USB device 054c:0374, that is used to connect
      a wireless keyboard and a wireless mouse.
      
      The keyboard works flawlessly, but the mouse (VGP-WMS3 in my case) does not
      seem to be generating any pointer events. The problem is that the mouse pointer
      is wrongly declared as a constant non-data variable in the report descriptor
      (see lsusb and usbhid-dump output below), with the consequence that it is
      ignored by the HID code.
      
      Add this device to the have-special-driver list and fix up the report
      descriptor in the Sony-specific driver which happens to already have a fixup
      for a similar firmware bug.
      
      # lsusb -vd 054C:0374
      Bus 003 Device 002: ID 054c:0374 Sony Corp.
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass            0 (Defined at Interface level)
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0         8
        idVendor           0x054c Sony Corp.
        idProduct          0x0374
        iSerial                 0
      [...]
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         3 Human Interface Device
            bInterfaceSubClass      1 Boot Interface Subclass
            bInterfaceProtocol      2 Mouse
            iInterface              2 RF Receiver
      [...]
                Report Descriptor: (length is 100)
      [...]
                  Item(Global): Usage Page, data= [ 0x01 ] 1
                                  Generic Desktop Controls
                  Item(Local ): Usage, data= [ 0x30 ] 48
                                  Direction-X
                  Item(Local ): Usage, data= [ 0x31 ] 49
                                  Direction-Y
                  Item(Global): Report Count, data= [ 0x02 ] 2
                  Item(Global): Report Size, data= [ 0x08 ] 8
                  Item(Global): Logical Minimum, data= [ 0x81 ] 129
                  Item(Global): Logical Maximum, data= [ 0x7f ] 127
                  Item(Main  ): Input, data= [ 0x07 ] 7
                                  Constant Variable Relative No_Wrap Linear
                                  Preferred_State No_Null_Position Non_Volatile Bitfield
      
      # usbhid-dump
      003:002:001:DESCRIPTOR         1357910009.758544
       05 01 09 02 A1 01 05 01 09 02 A1 02 85 01 09 01
       A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01
       81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02
       75 08 15 81 25 7F 81 07 A1 02 85 01 09 38 35 00
       45 00 15 81 25 7F 95 01 75 08 81 06 C0 A1 02 85
       01 05 0C 15 81 25 7F 95 01 75 08 0A 38 02 81 06
       C0 C0 C0 C0
      Signed-off-by: default avatarFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9637341b
    • J. Bruce Fields's avatar
      svcrpc: fix rpc server shutdown races · acb9bc5f
      J. Bruce Fields authored
      commit cc630d9f upstream.
      
      Rewrite server shutdown to remove the assumption that there are no
      longer any threads running (no longer true, for example, when shutting
      down the service in one network namespace while it's still running in
      others).
      
      Do that by doing what we'd do in normal circumstances: just CLOSE each
      socket, then enqueue it.
      
      Since there may not be threads to handle the resulting queued xprts,
      also run a simplified version of the svc_recv() loop run by a server to
      clean up any closed xprts afterwards.
      Tested-by: default avatarJason Tibbitts <tibbs@math.uh.edu>
      Tested-by: default avatarPaweł Sikora <pawel.sikora@agmk.net>
      Acked-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      acb9bc5f
    • J. Bruce Fields's avatar
      svcrpc: make svc_age_temp_xprts enqueue under sv_lock · cc5e7bc7
      J. Bruce Fields authored
      commit e75bafbf upstream.
      
      svc_age_temp_xprts expires xprts in a two-step process: first it takes
      the sv_lock and moves the xprts to expire off their server-wide list
      (sv_tempsocks or sv_permsocks) to a local list.  Then it drops the
      sv_lock and enqueues and puts each one.
      
      I see no reason for this: svc_xprt_enqueue() will take sp_lock, but the
      sv_lock and sp_lock are not otherwise nested anywhere (and documentation
      at the top of this file claims it's correct to nest these with sp_lock
      inside.)
      Tested-by: default avatarJason Tibbitts <tibbs@math.uh.edu>
      Tested-by: default avatarPaweł Sikora <pawel.sikora@agmk.net>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc5e7bc7