1. 13 10月, 2012 1 次提交
    • E
      userns: Properly print bluetooth socket uids · 1bbb3095
      Eric W. Biederman 提交于
      With user namespace support enabled building bluetooth generated the warning.
      net/bluetooth/af_bluetooth.c: In function ‘bt_seq_show’:
      net/bluetooth/af_bluetooth.c:598:7: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘kuid_t’ [-Wformat]
      
      Convert sock_i_uid from a kuid_t to a uid_t before printing, to avoid
      this problem.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Cc: Masatake YAMATO <yamato@redhat.com>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      1bbb3095
  2. 12 10月, 2012 1 次提交
  3. 22 9月, 2012 1 次提交
  4. 19 9月, 2012 6 次提交
    • J
      Bluetooth: Update management interface revision · 23b3b133
      Johan Hedberg 提交于
      For each kernel release where commands or events are added to the
      management interface, the revision field should be increment by one.
      
      The increment should only happen once per kernel release and not
      for every command/event that gets added. The revision value is for
      informational purposes only, but this simple policy would make any
      future debugging a lot simple.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      23b3b133
    • J
      Bluetooth: mgmt: Implement support for passkey notification · 92a25256
      Johan Hedberg 提交于
      This patch adds support for Secure Simple Pairing with devices that have
      KeyboardOnly as their IO capability. Such devices will cause a passkey
      notification on our side and optionally also keypress notifications.
      Without this patch some keyboards cannot be paired using the mgmt
      interface.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      92a25256
    • V
      Bluetooth: Fix not removing power_off delayed work · 78c04c0b
      Vinicius Costa Gomes 提交于
      For example, when a usb reset is received (I could reproduce it
      running something very similar to this[1] in a loop) it could be
      that the device is unregistered while the power_off delayed work
      is still scheduled to run.
      
      Backtrace:
      
      WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
      Hardware name: To Be Filled By O.E.M.
      ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x26
      Modules linked in: nouveau mxm_wmi btusb wmi bluetooth ttm coretemp drm_kms_helper
      Pid: 2114, comm: usb-reset Not tainted 3.5.0bt-next #2
      Call Trace:
       [<ffffffff8124cc00>] ? free_obj_work+0x57/0x91
       [<ffffffff81058f88>] warn_slowpath_common+0x7e/0x97
       [<ffffffff81059035>] warn_slowpath_fmt+0x41/0x43
       [<ffffffff8124ccb6>] debug_print_object+0x7c/0x8d
       [<ffffffff8106e3ec>] ? __queue_work+0x259/0x259
       [<ffffffff8124d63e>] ? debug_check_no_obj_freed+0x6f/0x1b5
       [<ffffffff8124d667>] debug_check_no_obj_freed+0x98/0x1b5
       [<ffffffffa00aa031>] ? bt_host_release+0x10/0x1e [bluetooth]
       [<ffffffff810fc035>] kfree+0x90/0xe6
       [<ffffffffa00aa031>] bt_host_release+0x10/0x1e [bluetooth]
       [<ffffffff812ec2f9>] device_release+0x4a/0x7e
       [<ffffffff8123ef57>] kobject_release+0x11d/0x154
       [<ffffffff8123ed98>] kobject_put+0x4a/0x4f
       [<ffffffff812ec0d9>] put_device+0x12/0x14
       [<ffffffffa009472b>] hci_free_dev+0x22/0x26 [bluetooth]
       [<ffffffffa0280dd0>] btusb_disconnect+0x96/0x9f [btusb]
       [<ffffffff813581b4>] usb_unbind_interface+0x57/0x106
       [<ffffffff812ef988>] __device_release_driver+0x83/0xd6
       [<ffffffff812ef9fb>] device_release_driver+0x20/0x2d
       [<ffffffff813582a7>] usb_driver_release_interface+0x44/0x7b
       [<ffffffff81358795>] usb_forced_unbind_intf+0x45/0x4e
       [<ffffffff8134f959>] usb_reset_device+0xa6/0x12e
       [<ffffffff8135df86>] usbdev_do_ioctl+0x319/0xe20
       [<ffffffff81203244>] ? avc_has_perm_flags+0xc9/0x12e
       [<ffffffff812031a0>] ? avc_has_perm_flags+0x25/0x12e
       [<ffffffff81050101>] ? do_page_fault+0x31e/0x3a1
       [<ffffffff8135eaa6>] usbdev_ioctl+0x9/0xd
       [<ffffffff811126b1>] vfs_ioctl+0x21/0x34
       [<ffffffff81112f7b>] do_vfs_ioctl+0x408/0x44b
       [<ffffffff81208d45>] ? file_has_perm+0x76/0x81
       [<ffffffff8111300f>] sys_ioctl+0x51/0x76
       [<ffffffff8158db22>] system_call_fastpath+0x16/0x1b
      
      [1] http://cpansearch.perl.org/src/DPAVLIN/Biblio-RFID-0.03/examples/usbreset.cSigned-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      78c04c0b
    • A
      Bluetooth: Fix freeing uninitialized delayed works · aad3d0e3
      Andrei Emeltchenko 提交于
      When releasing L2CAP socket which is in BT_CONFIG state l2cap_chan_close
      invokes l2cap_send_disconn_req which cancel delayed works which are only
      set in BT_CONNECTED state with l2cap_ertm_init. Add state check before
      cancelling those works.
      
      ...
      [ 9668.574372] [21085] l2cap_sock_release: sock cd065200, sk f073e800
      [ 9668.574399] [21085] l2cap_sock_shutdown: sock cd065200, sk f073e800
      [ 9668.574411] [21085] l2cap_chan_close: chan f073ec00 state BT_CONFIG sk f073e800
      [ 9668.574421] [21085] l2cap_send_disconn_req: chan f073ec00 conn ecc16600
      [ 9668.574441] INFO: trying to register non-static key.
      [ 9668.574443] the code is fine but needs lockdep annotation.
      [ 9668.574446] turning off the locking correctness validator.
      [ 9668.574450] Pid: 21085, comm: obex-client Tainted: G           O 3.5.0+ #57
      [ 9668.574452] Call Trace:
      [ 9668.574463]  [<c10a64b3>] __lock_acquire+0x12e3/0x1700
      [ 9668.574468]  [<c10a44fb>] ? trace_hardirqs_on+0xb/0x10
      [ 9668.574476]  [<c15e4f60>] ? printk+0x4d/0x4f
      [ 9668.574479]  [<c10a6e38>] lock_acquire+0x88/0x130
      [ 9668.574487]  [<c1059740>] ? try_to_del_timer_sync+0x60/0x60
      [ 9668.574491]  [<c1059790>] del_timer_sync+0x50/0xc0
      [ 9668.574495]  [<c1059740>] ? try_to_del_timer_sync+0x60/0x60
      [ 9668.574515]  [<f8aa1c23>] l2cap_send_disconn_req+0xe3/0x160 [bluetooth]
      ...
      Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      aad3d0e3
    • A
      Bluetooth: mgmt: Fix enabling LE while powered off · 562fcc24
      Andrzej Kaczmarek 提交于
      When new BT USB adapter is plugged in it's configured while still being powered
      off (HCI_AUTO_OFF flag is set), thus Set LE will only set dev_flags but won't
      write changes to controller. As a result it's not possible to start device
      discovery session on LE controller as it uses interleaved discovery which
      requires LE Supported Host flag in extended features.
      
      This patch ensures HCI Write LE Host Supported is sent when Set Powered is
      called to power on controller and clear HCI_AUTO_OFF flag.
      Signed-off-by: NAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
      Cc: stable@vger.kernel.org
      Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      562fcc24
    • A
      Bluetooth: mgmt: Fix enabling SSP while powered off · 3d1cbdd6
      Andrzej Kaczmarek 提交于
      When new BT USB adapter is plugged in it's configured while still being powered
      off (HCI_AUTO_OFF flag is set), thus Set SSP will only set dev_flags but won't
      write changes to controller. As a result remote devices won't use Secure Simple
      Pairing with our device due to SSP Host Support flag disabled in extended
      features and may also reject SSP attempt from our side (with possible fallback
      to legacy pairing).
      
      This patch ensures HCI Write Simple Pairing Mode is sent when Set Powered is
      called to power on controller and clear HCI_AUTO_OFF flag.
      Signed-off-by: NAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
      Cc: stable@vger.kernel.org
      Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      3d1cbdd6
  5. 09 9月, 2012 4 次提交
  6. 27 8月, 2012 2 次提交
  7. 22 8月, 2012 6 次提交
  8. 16 8月, 2012 6 次提交
  9. 15 8月, 2012 9 次提交
  10. 14 8月, 2012 1 次提交
    • J
      TTY: use tty_port_register_device · 734cc178
      Jiri Slaby 提交于
      Currently we have no way to assign tty->port while performing tty
      installation. There are two ways to provide the link tty_struct =>
      tty_port. Either by calling tty_port_install from tty->ops->install or
      tty_port_register_device called instead of tty_register_device when
      the device is being set up after connected.
      
      In this patch we modify most of the drivers to do the latter. When the
      drivers use tty_register_device and we have tty_port already, we
      switch to tty_port_register_device. So we have the tty_struct =>
      tty_port link for free for those.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      734cc178
  11. 11 8月, 2012 1 次提交
    • A
      tty: localise the lock · 89c8d91e
      Alan Cox 提交于
      The termios and other changes mean the other protections needed on the driver
      tty arrays should be adequate. Turn it all back on.
      
      This contains pieces folded in from the fixes made to the original patches
      
      | From: Geert Uytterhoeven <geert@linux-m68k.org>	(fix m68k)
      | From: Paul Gortmaker <paul.gortmaker@windriver.com>	(fix cris)
      | From: Jiri Kosina <jkosina@suze.cz>			(lockdep)
      | From: Eric Dumazet <eric.dumazet@gmail.com>		(lockdep)
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      89c8d91e
  12. 07 8月, 2012 2 次提交