Howard M. Harte [Tue, 2 Aug 2011 02:38:54 +0000 (19:38 -0700)]
net: wireless: bcmdhd: add support for mkeepalive.
Fix p2p group add issue.
Change-Id: Ieb8fba54e04912b4002837243c00ba90fd150e5d
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 1 Aug 2011 22:40:01 +0000 (15:40 -0700)]
net: wireless: bcmdhd: Check wldev_ioctl() for NULL parameter
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Peter Hurley [Mon, 25 Jul 2011 22:36:26 +0000 (18:36 -0400)]
Bluetooth: l2cap: Fix lost wakeup waiting for ERTM acks
Fix race condition which can result in missing wakeup during
l2cap socket shutdown.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:11:07 +0000 (00:11 -0400)]
Bluetooth: bnep: Fix lost wakeup of session thread
Fix race condition which can result in missing the wakeup intended
to stop the session thread.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:11:01 +0000 (00:11 -0400)]
Bluetooth: sco: Fix lost wakeups waiting to accept socket
Fix race conditions which can cause lost wakeups (or missed signals)
while waiting to accept a sco socket connection.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:10:52 +0000 (00:10 -0400)]
Bluetooth: l2cap: Fix lost wakeups waiting to accept socket
Fix race conditions which can cause lost wakeups (or misssed signals)
while waiting to accept an l2cap socket connection.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:10:46 +0000 (00:10 -0400)]
Bluetooth: Fix lost wakeups waiting for sock state change
Fix race conditions which can cause lost wakeups while waiting
for sock state to change.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:10:41 +0000 (00:10 -0400)]
Bluetooth: rfcomm: Fix lost wakeups waiting to accept socket
Fix race conditions which can cause lost wakeups (or missed
signals) while waiting to accept an rfcomm socket connection.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Sun, 24 Jul 2011 04:10:35 +0000 (00:10 -0400)]
Bluetooth: rfcomm: Remove unnecessary krfcommd event
Removed superfluous event handling which was used to signal
that the rfcomm kthread had been woken. This appears to have been
used to prevent lost wakeups. Correctly ordering when the task
state is set to TASK_INTERRUPTIBLE is sufficient to prevent lost wakeups.
To prevent wakeups which occurred prior to initially setting
TASK_INTERRUPTIBLE from being lost, the main work of the thread loop -
rfcomm_process_sessions() - is performed prior to sleeping.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Dmitry Shmidt [Fri, 29 Jul 2011 20:45:06 +0000 (13:45 -0700)]
net: wireless: bcmdhd: Fix memory corruption in wl_android_get_rssi()
In case of FW problem wldev_get_ssid() doesn't return error and ssid
structure has garbage.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Wed, 27 Jul 2011 19:16:11 +0000 (12:16 -0700)]
net: wireless: bcmdhd: change logic for removing monitor interace for P2P.
Change-Id: Ie757ec25c86d0402d0463a9b7f2fff14b840f446
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Wed, 27 Jul 2011 01:27:14 +0000 (18:27 -0700)]
Additional patch for scan and connection problem.
Change-Id: I79a25bd3f36f5d3accae83116084b8baf63a1033
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 26 Jul 2011 22:05:47 +0000 (15:05 -0700)]
net: wireless: bcmdhd: Put p2p_dev_addr under DHD_P2P_DEV_ADDR_FROM_SYSFS
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 26 Jul 2011 22:00:34 +0000 (15:00 -0700)]
net: wireless: bcmdhd: Fix rfkill cleaning on failure
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Tue, 26 Jul 2011 02:46:20 +0000 (19:46 -0700)]
Fix scan and connection problem.
Change-Id: Idd77caf358fc77c4b81929c644020d09009e4f36
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Tue, 26 Jul 2011 02:15:11 +0000 (19:15 -0700)]
Update to 5.90.125.52:
Fix unremoved monitor interface problem after killing hostapd.
Add WPS support for hostapd.
Change-Id: I4e476fafb203592fcdf5c15a526b67d4aa78df3e
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Tue, 26 Jul 2011 00:19:49 +0000 (17:19 -0700)]
Fix a potential crash/memory leak if NVRAM fails to load.
Change-Id: I27f41dd5833835b74f38524e9691d68ac807c991
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 25 Jul 2011 16:53:20 +0000 (09:53 -0700)]
net: wireless: bcmdhd: Ignore WL_BSS_INFO_VERSION value
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Lin Ma [Fri, 22 Jul 2011 22:51:01 +0000 (15:51 -0700)]
Fix ag band issue and escan crashes
Change-Id: Ie1bdb52a362755b7c922be9b721e9cf0e4042d95
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Todd Poynor [Mon, 25 Jul 2011 21:54:03 +0000 (14:54 -0700)]
PM: Fix printing IRQ names for pending wakeup IRQs
The IRQ name has moved to the struct irqaction list (so print
first action's name).
Change-Id: I65a627457f9abaf7c1dcc32d8814243ba2ff4717
Signed-off-by: Todd Poynor <toddpoynor@google.com>
JP Abgrall [Fri, 22 Jul 2011 17:34:22 +0000 (10:34 -0700)]
netfilter: qtaguid: disable #define DEBUG
This would cause log spam to the point of slowing down the system.
Change-Id: I5655f0207935004b0198f43ad0d3c9ea25466e4e
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Sun, 17 Jul 2011 23:07:23 +0000 (16:07 -0700)]
netfilter: xt_qtaguid: add uid permission checks during ctrl/stats access
* uid handling
- Limit UID impersonation to processes with a gid in AID_NET_BW_ACCT.
This affects socket tagging, and data removal.
- Limit stats lookup to own uid or the process gid is in AID_NET_BW_STATS.
This affects stats lookup.
* allow pacifying the module
Setting passive to Y/y will make the module return immediately on
external stimulus.
No more stats and silent success on ctrl writes.
Mainly used when one suspects this module of misbehaving.
Change-Id: I83990862d52a9b0922aca103a0f61375cddeb7c4
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Sat, 16 Jul 2011 05:27:28 +0000 (22:27 -0700)]
netfilter: qtaguid: add tag delete command, expand stats output.
* Add a new ctrl command to delete stored data.
d <acct_tag> [<uid>]
The uid will default to the running process's.
The accounting tag can be 0, in which case all counters and socket tags
associated with the uid will be cleared.
* Simplify the ctrl command handling at the expense of duplicate code.
This should make it easier to maintain.
* /proc/net/xt_qtaguid/stats now returns more stats
idx iface acct_tag_hex uid_tag_int
{rx,tx}_{bytes,packets}
{rx,tx}_{tcp,udp,other}_{bytes,packets}
the {rx,tx}_{bytes,packets} are the totals.
* re-tagging will now allow changing the uid.
Change-Id: I9594621543cefeab557caa3d68a22a3eb320466d
Signed-off-by: JP Abgrall <jpa@google.com>
JP Abgrall [Wed, 13 Jul 2011 23:02:31 +0000 (16:02 -0700)]
netfilter: quota2: add support to log quota limit reached.
This uses the NETLINK NETLINK_NFLOG family to log a single message
when the quota limit is reached.
It uses the same packet type as ipt_ULOG, but
- never copies skb data,
- uses 112 as the event number (ULOG's +1)
It doesn't log if the module param "event_num" is 0.
Change-Id: I6f31736b568bb31a4ff0b9ac2ee58380e6b675ca
Signed-off-by: JP Abgrall <jpa@google.com>
Dmitry Shmidt [Wed, 20 Jul 2011 23:04:45 +0000 (16:04 -0700)]
net: wireless: bcmdhd: Fix compilation for WEXT
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 20 Jul 2011 17:31:30 +0000 (10:31 -0700)]
net: wireless: bcmdhd: Allow firmware_path parameter change
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Lin Ma [Wed, 20 Jul 2011 01:20:12 +0000 (18:20 -0700)]
Release 5.90.125.48 Add regulatory domain check in cfg80211 driver and fix PNO issues
Change-Id: I394f4eb017ca61861f16632e8998a8fb07e6fca7
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 19 Jul 2011 17:00:31 +0000 (10:00 -0700)]
net: wireless: bcmdhd: Allow empty scan results
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 19 Jul 2011 16:58:13 +0000 (09:58 -0700)]
net: wireless: bcmdhd: Fix compilation for kernel 3.0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Lin Ma [Mon, 18 Jul 2011 18:42:36 +0000 (11:42 -0700)]
Update to 5.90.125.40
Add monitor interface support and fix cfg80211 management frame isses
Add support for hostapd
Use private command to get p2p device address
Change-Id: Ie490e38f1af9f259ff4a96b2f7d367119c65c377
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Choi, Jong-Hwan [Fri, 15 Jul 2011 01:56:25 +0000 (10:56 +0900)]
net: wireless: bcm4329: fix array subscript is below array bounds
Change-Id: I5d521895070d255f7ac0c9eaf262ec9f4cdd2f8a
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>
Mike Lockwood [Thu, 21 Jul 2011 18:39:17 +0000 (11:39 -0700)]
USB: gadget: f_accessory: Add ioctl to detect USB accessory attached at boot
Signed-off-by: Mike Lockwood <lockwood@android.com>
Erik Gilling [Thu, 21 Jul 2011 21:07:45 +0000 (14:07 -0700)]
earlysuspend: add verbose debug flag
when enabled, prints out the function of each handler as they are called
Change-Id: I5ed251867e0e3aa3cd05f030ff3579808cedd0c2
Signed-off-by: Erik Gilling <konkers@android.com>
Mike Lockwood [Thu, 21 Jul 2011 00:08:28 +0000 (17:08 -0700)]
USB: gadget: f_mtp: Move all setup handling to mtp_ctrlrequest
The composite driver no longer sends setup requests to functions if the
destination is USB_RECIP_DEVICE, so we need to handle the requests
here instead of the function's setup callback.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Colin Cross [Tue, 19 Jul 2011 19:33:45 +0000 (12:33 -0700)]
power: Add option to log time spent in suspend
Prints the time spent in suspend in the kernel log, and
keeps statistics on the time spent in suspend in
/sys/kernel/debug/suspend_time
Change-Id: Ia6b9ebe4baa0f7f5cd211c6a4f7e813aefd3fa1d
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Allen Martin [Tue, 19 Jul 2011 21:56:21 +0000 (14:56 -0700)]
cpufreq: interactive: fix checkpatch warnings on long lines
Fix up checkpatch warning introduced by long lines in timer_rate
patch.
Change-Id: I22b105dafb1b49390799bb7577464da03f0f8afb
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 06:54:07 +0000 (23:54 -0700)]
Documentation: cpufreq: add description of timer_rate
Add description of timer_rate tunable and clean up some
typos.
Change-Id: I4b96a36aad51eed3bef0ee5f571dc6e0a94c8dd9
Signed-off-by: Allen Martin <amartin@nvidia.com>
Ilia Kolomisnky [Fri, 15 Jul 2011 18:30:21 +0000 (18:30 +0000)]
Bluetooth: Fix crash with incoming L2CAP connections
Another regression fix considering incomming l2cap connections with
defer_setup enabled. In situations when incomming connection is
extracted with l2cap_sock_accept, it's bt_sock info will have
'parent' member zerroed, but 'parent' may be used unconditionally
in l2cap_conn_start() and l2cap_security_cfm() when defer_setup
is enabled.
Backtrace:
[<
bf02d5ac>] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [<
bf01f01c>] (hci_event_pac
ket+0xc2c/0x4aa4 [bluetooth])
[<
bf01e3f0>] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [<
bf01a844>] (hci_rx_task+0x
cc/0x27c [bluetooth])
[<
bf01a778>] (hci_rx_task+0x0/0x27c [bluetooth]) from [<
c008eee4>] (tasklet_action+0xa0/
0x15c)
[<
c008ee44>] (tasklet_action+0x0/0x15c) from [<
c008f38c>] (__do_softirq+0x98/0x130)
r7:
00000101 r6:
00000018 r5:
00000001 r4:
efc46000
[<
c008f2f4>] (__do_softirq+0x0/0x130) from [<
c008f524>] (do_softirq+0x4c/0x58)
[<
c008f4d8>] (do_softirq+0x0/0x58) from [<
c008f5e0>] (run_ksoftirqd+0xb0/0x1b4)
r4:
efc46000 r3:
00000001
[<
c008f530>] (run_ksoftirqd+0x0/0x1b4) from [<
c009f2a8>] (kthread+0x84/0x8c)
r7:
00000000 r6:
c008f530 r5:
efc47fc4 r4:
efc41f08
[<
c009f224>] (kthread+0x0/0x8c) from [<
c008cc84>] (do_exit+0x0/0x5f0)
Signed-off-by: Ilia Kolomisnky <iliak@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gustavo F. Padovan [Fri, 15 Jul 2011 18:30:20 +0000 (18:30 +0000)]
Bluetooth: Fix regression in L2CAP connection procedure
Caused by the following commit, partially revert it.
commit
9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
Author: Gustavo F. Padovan <padovan@profusion.mobi>
Date: Thu Jun 30 16:11:30 2011 -0300
Bluetooth: Fix regression with incoming L2CAP connections
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the
df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tomas Targownik [Thu, 30 Jun 2011 19:30:44 +0000 (16:30 -0300)]
Bluetooth: Fix memory leak under page timeouts
If the remote device is not present, the connections attemp fails and
the struct hci_conn was not freed
Signed-off-by: Tomas Targownik <ttargownik@geicp.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 30 Jun 2011 19:11:30 +0000 (16:11 -0300)]
Bluetooth: Fix regression with incoming L2CAP connections
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the
df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.
Based on patch from: Ilia Kolomisnky <iliak@ti.com>
Change-Id: Ifcffe0124adbbc6d1931389ff7476dd0304d6f51
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Peter Hurley [Thu, 30 Jun 2011 17:53:53 +0000 (13:53 -0400)]
Bluetooth: Fix hidp disconnect deadlocks and lost wakeup
Partial revert of commit
aabf6f89. When the hidp session thread
was converted from kernel_thread to kthread, the atomic/wakeups
were replaced with kthread_stop. kthread_stop has blocking semantics
which are inappropriate for the hidp session kthread. In addition,
the kthread signals itself to terminate in hidp_process_hid_control()
- it cannot do this with kthread_stop().
Lastly, a wakeup can be lost if the wakeup happens between checking
for the loop exit condition and setting the current state to
TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
the task state should not be changed between the condition test and
the yield - via schedule() - as this creates a race between the
wakeup and resetting the state back to interruptible.)
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Dan Rosenberg [Fri, 24 Jun 2011 12:38:05 +0000 (08:38 -0400)]
Bluetooth: Prevent buffer overflow in l2cap config request
A remote user can provide a small value for the command size field in
the command header of an l2cap configuration request, resulting in an
integer underflow when subtracting the size of the configuration request
header. This results in copying a very large amount of data via
memcpy() and destroying the kernel heap. Check for underflow.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Chia-chi Yeh [Fri, 15 Jul 2011 22:32:57 +0000 (15:32 -0700)]
net: Only NET_ADMIN is allowed to fully control TUN interfaces.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Allen Martin [Fri, 1 Jul 2011 18:19:14 +0000 (11:19 -0700)]
cpufreq: interactive: cleanup checkpatch warnings
Cleanup some style warnings reported by checkpatch
Change-Id: Ie2e6903d52867fb3347e009d7efa3bc4ca755cea
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 18:17:39 +0000 (11:17 -0700)]
cpufreq: Add more verbose description of interactive governor
Update the Kconfig help paragraph to give more detail about
interactive governor.
Change-Id: I607b817b370accac3a685001649a15e2f7894f59
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 18:16:06 +0000 (11:16 -0700)]
Documentation: remove trailing whitespace in governors.txt
Fixes a checkpatch warning
Change-Id: I2962b7c32f336188de0d2fe4f0f13f1199cb68e2
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Fri, 1 Jul 2011 06:54:07 +0000 (23:54 -0700)]
cpufreq: interactive: add sysfs control for timer rate
Add a new sysfs control that tunes the rate of the timer used to
increase cpu frequency
Change-Id: I1aa13ae54bb43aff5b3688984d2955f56aae1658
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Thu, 30 Jun 2011 23:59:19 +0000 (16:59 -0700)]
cpufreq: interactive: Add error checking on sysfs interfaces
This adds better error checking on tunable parameters on sysfs
interfaces. Also fixes return value from these functions, previously
on success they would return 0 which would cause a infinite loop.
Change-Id: Ic05038492166f8673d007202092471f98a2f0dfa
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Tue, 28 Jun 2011 16:58:39 +0000 (09:58 -0700)]
cpufreq: interactive: use idle notifier
Convert interactive governor to use idle notifier instead of
hooking pm_idle directly.
Change-Id: I47e007f330468ac559240a0ae8a3cb06a89ccb67
Signed-off-by: Allen Martin <amartin@nvidia.com>
Allen Martin [Tue, 28 Jun 2011 17:40:30 +0000 (10:40 -0700)]
cpufreq: interactive: remove debug trace code
Remove debug trace code in preparation of upstreaming
Change-Id: I0905885e75031f5e9d7cb06878fb68c1fd06d4fe
Signed-off-by: Allen Martin <amartin@nvidia.com>
Todd Poynor [Sat, 25 Jun 2011 02:33:01 +0000 (19:33 -0700)]
ARM: Move leds idle start/stop calls to idle notifiers
Change-Id: I5d8e4e85b17bbab7992ecb477f0bdb5e4138b166
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 16 Jun 2011 00:44:50 +0000 (17:44 -0700)]
ARM: Call idle notifiers
Change-Id: Id833e61c13baa1783705ac9e9046d1f0cc90c95e
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Todd Poynor [Thu, 16 Jun 2011 00:21:57 +0000 (17:21 -0700)]
Move x86_64 idle notifiers to generic
Move the x86_64 idle notifiers originally by Andi Kleen and Venkatesh
Pallipadi to generic.
Change-Id: Idf29cda15be151f494ff245933c12462643388d5
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Mike Lockwood [Thu, 14 Jul 2011 23:42:42 +0000 (19:42 -0400)]
USB: gadget: f_mtp: Add support for sending MTP header during file transfer
MTP_SEND_FILE_WITH_HEADER ioctl allows sending a file with the 12 byte header
prepended at the beginning.
This is to allow MTP to use a single packet for the data phase instead of two.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Dmitry Shmidt [Wed, 13 Jul 2011 22:09:00 +0000 (15:09 -0700)]
net: wireless: bcmdhd: Add PNO support through CFG80211 private command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Rom Lemarchand [Wed, 13 Jul 2011 19:15:34 +0000 (12:15 -0700)]
net: wireless: bcmdhd: Fix build break with newer versions of gcc
In case the WPA cipher can't be determined the pval and gval variables don't
get updated which generates a warning in newer versions of gcc (tested with
4.5.2). Since the bcmdhd driver gets compiled with warnings treated as errors
this change is needed to fix the build.
Change-Id: Ia483777fee54ac526bb0db7c666fa2bf5df17354
Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
Dmitry Shmidt [Wed, 13 Jul 2011 17:43:20 +0000 (10:43 -0700)]
net: wireless: bcm4329: Fix roaming message processing
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 12 Jul 2011 18:19:48 +0000 (11:19 -0700)]
net: wireless: bcmdhd: Add country private command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 12 Jul 2011 00:17:23 +0000 (17:17 -0700)]
net: wireless: bcm4329: Add packet filtering commands
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Colin Cross [Wed, 13 Jul 2011 02:53:24 +0000 (19:53 -0700)]
cgroup: Add generic cgroup subsystem permission checks
Rather than using explicit euid == 0 checks when trying to move
tasks into a cgroup via CFS, move permission checks into each
specific cgroup subsystem. If a subsystem does not specify a
'allow_attach' handler, then we fall back to doing our checks
the old way.
Use the 'allow_attach' handler for the 'cpu' cgroup to allow
non-root processes to add arbitrary processes to a 'cpu' cgroup
if it has the CAP_SYS_NICE capability set.
This version of the patch adds a 'allow_attach' handler instead
of reusing the 'can_attach' handler. If the 'can_attach' handler
is reused, a new cgroup that implements 'can_attach' but not
the permission checks could end up with no permission checks
at all.
Change-Id: Icfa950aa9321d1ceba362061d32dc7dfa2c64f0c
Original-Author: San Mehat <san@google.com>
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 13 Jul 2011 03:12:45 +0000 (20:12 -0700)]
Revert "cgroup: Add generic cgroup subsystem permission checks."
This reverts commit
1d38bc7d0523af2233b4280e2aeab34c6a076665.
Change-Id: I2c5066b696cbdd5ca117ed74718bcb7e70e878e7
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 13 Jul 2011 03:10:37 +0000 (20:10 -0700)]
Merge commit 'v3.0-rc7' into android-3.0
JP Abgrall [Tue, 12 Jul 2011 19:02:59 +0000 (12:02 -0700)]
netfitler: fixup the quota2, and enable.
The xt_quota2 came from
http://sourceforge.net/projects/xtables-addons/develop
It needed tweaking for it to compile within the kernel tree.
Fixed kmalloc() and create_proc_entry() invocations within
a non-interruptible context.
Removed useless copying of current quota back to the iptable's
struct matchinfo:
- those are per CPU: they will change randomly based on which
cpu gets to update the value.
- they prevent matching a rule: e.g.
-A chain -m quota2 --name q1 --quota 123
can't be followed by
-D chain -m quota2 --name q1 --quota 123
as the 123 will be compared to the struct matchinfo's quota member.
Change-Id: I021d3b743db3b22158cc49acb5c94d905b501492
Signed-off-by: JP Abgrall <jpa@google.com>
Linus Torvalds [Mon, 11 Jul 2011 23:51:52 +0000 (16:51 -0700)]
Linux 3.0-rc7
Linus Torvalds [Mon, 11 Jul 2011 23:48:38 +0000 (16:48 -0700)]
Documentation/Changes: remove some really obsolete text
That file harkens back to the days of the big 2.4 -> 2.6 version jump,
and was based even then on older versions. Some of it is just obsolete,
and Jesper Juhl points out that it talks about kernel versions 2.6 and
should be updated to 3.0.
Remove some obsolete text, and re-phrase some other to not be 2.6-specific.
Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 11 Jul 2011 23:43:27 +0000 (16:43 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
[media] msp3400: fill in v4l2_tuner based on vt->type field
[media] tuner-core.c: don't change type field in g_tuner or g_frequency
[media] cx18/ivtv: fix g_tuner support
[media] tuner-core: power up tuner when called with s_power(1)
[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
[media] tuner-core: simplify the standard fixup
[media] tuner-core/v4l2-subdev: document that the type field has to be filled in
[media] v4l2-subdev.h: remove unused s_mode tuner op
[media] feature-removal-schedule: change in how radio device nodes are handled
[media] bttv: fix s_tuner for radio
[media] pvrusb2: fix g/s_tuner support
[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
[media] tuner-core: fix tuner_resume: use t->mode instead of t->type
[media] tuner-core: fix s_std and s_tuner
JP Abgrall [Tue, 21 Jun 2011 18:14:49 +0000 (11:14 -0700)]
netfilter: adding the original quota2 from xtables-addons
The original xt_quota in the kernel is plain broken:
- counts quota at a per CPU level
(was written back when ubiquitous SMP was just a dream)
- provides no way to count across IPV4/IPV6.
This patch is the original unaltered code from:
http://sourceforge.net/projects/xtables-addons
at commit
e84391ce665cef046967f796dd91026851d6bbf3
Change-Id: I19d49858840effee9ecf6cff03c23b45a97efdeb
Signed-off-by: JP Abgrall <jpa@google.com>
Colin Cross [Fri, 24 Jun 2011 22:58:51 +0000 (15:58 -0700)]
USB: otg: add otg id notifier utiltiies
Add a otg_id notifier to allow multiple drivers to cooperate to
determine the type of cable connected to a USB connector without
requiring direct calls between the drivers.
Change-Id: Ic5675f1a89daf85b17336765de24e4bdb6df6348
Signed-off-by: Colin Cross <ccross@android.com>
Dima Zavin [Fri, 8 Jul 2011 06:20:27 +0000 (23:20 -0700)]
pda_power: add support for using otg transceiver events
If the platform data sets the use_otg_notifier flag,
the driver will now register an otg notifier callback and listen
to transceiver events for AC/USB plug-in events instead. This would
normally be used by not specifying is_xx_online callbacks and
not specifying any irqs so the state machine is completely driven
from OTG xceiver events.
Change-Id: Ic4b3bc4010f299156e41fd2411696c7ff5a88e92
Signed-off-by: Dima Zavin <dima@android.com>
Linus Torvalds [Mon, 11 Jul 2011 19:49:03 +0000 (12:49 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM: Reintroduce dropped call to check_wakeup_irqs
Linus Torvalds [Mon, 11 Jul 2011 19:48:24 +0000 (12:48 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: drop spinlock before calling cifs_put_tlink
cifs: fix expand_dfs_referral
cifs: move bdi_setup_and_register outside of CONFIG_CIFS_DFS_UPCALL
cifs: factor smb_vol allocation out of cifs_setup_volume_info
cifs: have cifs_cleanup_volume_info not take a double pointer
cifs: fix build_unc_path_to_root to account for a prefixpath
cifs: remove bogus call to cifs_cleanup_volume_info
Linus Torvalds [Mon, 11 Jul 2011 19:47:53 +0000 (12:47 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.
Linus Torvalds [Mon, 11 Jul 2011 19:47:09 +0000 (12:47 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
hp-wmi: fix use after free
dell-laptop - using buffer without mutex_lock
Revert: "dell-laptop: Toggle the unsupported hardware killswitch"
platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
thinkpad-acpi: handle HKEY 0x4010, 0x4011 events
drivers/platform/x86: Fix memory leak
thinkpad-acpi: handle some new HKEY 0x60xx events
acer-wmi: fix bitwise bug when set device state
acer-wmi: Only update rfkill status for associated hotkey events
Linus Torvalds [Mon, 11 Jul 2011 19:46:39 +0000 (12:46 -0700)]
Merge branch 'movieboard' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: do not bind to Pinnacle cards, avert panic
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Muthu Kumar [Mon, 11 Jul 2011 18:04:58 +0000 (11:04 -0700)]
Documentation/spinlocks.txt: Remove reference to sti()/cli()
Since we removed sti()/cli() and related, how about removing it from
Documentation/spinlocks.txt?
Signed-off-by: Muthukumar R <muthur@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:46 +0000 (18:31 -0300)]
Bluetooth: Add support for returning the encryption key size
This will be useful when userspace wants to restrict some kinds of
operations based on the length of the key size used to encrypt the
link.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:45 +0000 (18:31 -0300)]
Bluetooth: Add support for storing the key size
In some cases it will be useful having the key size used for
encrypting the link. For example, some profiles may restrict
some operations depending on the key length.
The key size is stored in the key that is passed to userspace
using the pin_length field in the key structure.
For now this field is only valid for LE controllers. 3.0+HS
controllers define the Read Encryption Key Size command, this
field is intended for storing the value returned by that
command.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:44 +0000 (18:31 -0300)]
Bluetooth: Add support for communicating keys with userspace
As the key format has changed to something that has a dynamic size,
the way that keys are received and sent must be changed.
The structure fields order is changed to make the parsing of the
information received from the Management Interface easier.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:42 +0000 (18:59 -0300)]
Bluetooth: Remove unused field in hci_conn
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:41 +0000 (18:59 -0300)]
Bluetooth: Use the stored LTK for restabilishing security
Now that it's possible that the exchanged key is present in
the link key list, we may be able to estabilish security with
an already existing key, without need to perform any SMP
procedure.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:40 +0000 (18:59 -0300)]
Bluetooth: Use the link key list to temporarily store the STK
With this we can use only one place to store all keys, without
need to use a field in the connection structure for this
purpose.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:39 +0000 (18:59 -0300)]
Bluetooth: Add support for storing the LTK
Now when the LTK is received from the remote or generated it is stored,
so it can later be used.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:38 +0000 (18:59 -0300)]
Bluetooth: Fix SM pairing parameters negotiation
Before implementing SM key distribution, the pairing features
exchange must be better negotiated, taking into account some
features of the host and connection requirements.
If we are in the "not pairable" state, it makes no sense to
exchange any key. This allows for simplification of the key
negociation method.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:37 +0000 (18:59 -0300)]
Bluetooth: Reject an encryption request when the key isn't found
Now that we have methods to finding keys by its parameters we can
reject an encryption request if the key isn't found.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:36 +0000 (18:59 -0300)]
Bluetooth: Add functions to manipulate the link key list for SMP
As the LTK (the new type of key being handled now) has more data
associated with it, we need to store this extra data and retrieve
the keys based on that data.
Methods for searching for a key and for adding a new LTK are
introduced here.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:35 +0000 (18:59 -0300)]
Bluetooth: Add new structures for supporting SM key distribution
We need these changes because SMP keys may have more information
associated with them, for example, in the LTK case, it has an
encrypted diversifier (ediv) and a random number (rand).
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:34 +0000 (18:59 -0300)]
Bluetooth: Add support for SMP phase 3 (key distribution)
This adds support for generating and distributing all the keys
specified in the third phase of SMP.
This will make possible to re-establish secure connections, resolve
private addresses and sign commands.
For now, the values generated are random.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Thu, 7 Jul 2011 16:39:03 +0000 (09:39 -0700)]
Bluetooth: Remove L2CAP busy queue
The ERTM receive buffer is now handled in a way that does not require
the busy queue and the associated polling code.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Thu, 7 Jul 2011 16:39:02 +0000 (09:39 -0700)]
Bluetooth: Use event-driven approach for handling ERTM receive buffer
This change moves most L2CAP ERTM receive buffer handling out of the
L2CAP core and in to the socket code. It's up to the higher layer
(the socket code, in this case) to tell the core when its buffer is
full or has space available. The recv op should always accept
incoming ERTM data or else the connection will go down.
Within the socket layer, an skb that does not fit in the socket
receive buffer will be temporarily stored. When the socket is read
from, that skb will be placed in the receive buffer if possible. Once
adequate buffer space becomes available, the L2CAP core is informed
and the ERTM local busy state is cleared.
Receive buffer management for non-ERTM modes is unchanged.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Thu, 7 Jul 2011 16:39:01 +0000 (09:39 -0700)]
Bluetooth: Move code for ERTM local busy state to separate functions
The local busy state is entered and exited based on buffer status in
the socket layer (or other upper layer). This change is in
preparation for general buffer status reports from the socket layer,
which will then be used to change the local busy status.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 7 Jul 2011 13:30:36 +0000 (10:30 -0300)]
Bluetooth: Fix potential deadlock in mgmt
All threads running in process context should disable local bottom
halve before locking hdev->lock.
This patch fix the following message generated when Bluetooh module
is loaded with enable_mgmt=y (CONFIG_PROVE_LOCKING enabled).
[ 107.880781] =================================
[ 107.881631] [ INFO: inconsistent lock state ]
[ 107.881631] 2.6.39+ #1
[ 107.881631] ---------------------------------
[ 107.881631] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 107.881631] rcuc0/7 [HC0[0]:SC1[3]:HE1:SE0] takes:
[ 107.881631] (&(&hdev->lock)->rlock){+.?...}, at: [<
ffffffffa0012c8d>] mgmt_set_local_name_complete+0x84/0x10b [bluetooth]
[ 107.881631] {SOFTIRQ-ON-W} state was registered at:
[ 107.881631] [<
ffffffff8105188b>] __lock_acquire+0x347/0xd52
[ 107.881631] [<
ffffffff810526ac>] lock_acquire+0x8a/0xa7
[ 107.881631] [<
ffffffff812b3758>] _raw_spin_lock+0x2c/0x3b
[ 107.881631] [<
ffffffffa0011cc2>] mgmt_control+0xd4d/0x175b [bluetooth]
[ 107.881631] [<
ffffffffa0013275>] hci_sock_sendmsg+0x97/0x293 [bluetooth]
[ 107.881631] [<
ffffffff8121940c>] sock_aio_write+0x126/0x13a
[ 107.881631] [<
ffffffff810a35fa>] do_sync_write+0xba/0xfa
[ 107.881631] [<
ffffffff810a3beb>] vfs_write+0xaa/0xca
[ 107.881631] [<
ffffffff810a3d80>] sys_write+0x45/0x69
[ 107.881631] [<
ffffffff812b4892>] system_call_fastpath+0x16/0x1b
[ 107.881631] irq event stamp:
2100876
[ 107.881631] hardirqs last enabled at (
2100876): [<
ffffffff812b40d4>] restore_args+0x0/0x30
[ 107.881631] hardirqs last disabled at (
2100875): [<
ffffffff812b3f6a>] save_args+0x6a/0x70
[ 107.881631] softirqs last enabled at (
2100862): [<
ffffffff8106a805>] rcu_cpu_kthread+0x2b5/0x2e2
[ 107.881631] softirqs last disabled at (
2100863): [<
ffffffff812b56bc>] call_softirq+0x1c/0x26
[ 107.881631]
[ 107.881631] other info that might help us debug this:
[ 107.881631] Possible unsafe locking scenario:
[ 107.881631]
[ 107.881631] CPU0
[ 107.881631] ----
[ 107.881631] lock(&(&hdev->lock)->rlock);
[ 107.881631] <Interrupt>
[ 107.881631] lock(&(&hdev->lock)->rlock);
[ 107.881631]
[ 107.881631] *** DEADLOCK ***
[ 107.881631]
[ 107.881631] 1 lock held by rcuc0/7:
[ 107.881631] #0: (hci_task_lock){++.-..}, at: [<
ffffffffa0008353>] hci_rx_task+0x49/0x2f3 [bluetooth]
[ 107.881631]
[ 107.881631] stack backtrace:
[ 107.881631] Pid: 7, comm: rcuc0 Not tainted 2.6.39+ #1
[ 107.881631] Call Trace:
[ 107.881631] <IRQ> [<
ffffffff812ae901>] print_usage_bug+0x1e7/0x1f8
[ 107.881631] [<
ffffffff8100a796>] ? save_stack_trace+0x27/0x44
[ 107.881631] [<
ffffffff8104fc3f>] ? print_irq_inversion_bug.part.26+0x19a/0x19a
[ 107.881631] [<
ffffffff810504bb>] mark_lock+0x106/0x258
[ 107.881631] [<
ffffffff81051817>] __lock_acquire+0x2d3/0xd52
[ 107.881631] [<
ffffffff8102be73>] ? vprintk+0x3ab/0x3d7
[ 107.881631] [<
ffffffff810526ac>] lock_acquire+0x8a/0xa7
[ 107.881631] [<
ffffffffa0012c8d>] ? mgmt_set_local_name_complete+0x84/0x10b [bluetooth]
[ 107.881631] [<
ffffffff81052615>] ? lock_release+0x16c/0x179
[ 107.881631] [<
ffffffff812b3952>] _raw_spin_lock_bh+0x31/0x40
[ 107.881631] [<
ffffffffa0012c8d>] ? mgmt_set_local_name_complete+0x84/0x10b [bluetooth]
[ 107.881631] [<
ffffffffa0012c8d>] mgmt_set_local_name_complete+0x84/0x10b [bluetooth]
[ 107.881631] [<
ffffffffa000d3fe>] hci_event_packet+0x122b/0x3e12 [bluetooth]
[ 107.881631] [<
ffffffff81050658>] ? mark_held_locks+0x4b/0x6d
[ 107.881631] [<
ffffffff812b3cff>] ? _raw_spin_unlock_irqrestore+0x40/0x4d
[ 107.881631] [<
ffffffff810507b9>] ? trace_hardirqs_on_caller+0x13f/0x172
[ 107.881631] [<
ffffffff812b3d07>] ? _raw_spin_unlock_irqrestore+0x48/0x4d
[ 107.881631] [<
ffffffffa00083d2>] hci_rx_task+0xc8/0x2f3 [bluetooth]
[ 107.881631] [<
ffffffff8102f836>] ? __local_bh_enable+0x90/0xa4
[ 107.881631] [<
ffffffff8102f5a9>] tasklet_action+0x87/0xe6
[ 107.881631] [<
ffffffff8102fa11>] __do_softirq+0x9f/0x13f
[ 107.881631] [<
ffffffff812b56bc>] call_softirq+0x1c/0x26
[ 107.881631] <EOI> [<
ffffffff810033b8>] ? do_softirq+0x46/0x9a
[ 107.881631] [<
ffffffff8106a805>] ? rcu_cpu_kthread+0x2b5/0x2e2
[ 107.881631] [<
ffffffff8102f906>] _local_bh_enable_ip+0xac/0xc9
[ 107.881631] [<
ffffffff8102f93b>] local_bh_enable+0xd/0xf
[ 107.881631] [<
ffffffff8106a805>] rcu_cpu_kthread+0x2b5/0x2e2
[ 107.881631] [<
ffffffff81041586>] ? __init_waitqueue_head+0x46/0x46
[ 107.881631] [<
ffffffff8106a550>] ? rcu_yield.constprop.42+0x98/0x98
[ 107.881631] [<
ffffffff81040f0a>] kthread+0x7f/0x87
[ 107.881631] [<
ffffffff812b55c4>] kernel_thread_helper+0x4/0x10
[ 107.881631] [<
ffffffff812b40d4>] ? retint_restore_args+0x13/0x13
[ 107.881631] [<
ffffffff81040e8b>] ? __init_kthread_worker+0x53/0x53
[ 107.881631] [<
ffffffff812b55c0>] ? gs_change+0x13/0x13
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 7 Jul 2011 13:30:35 +0000 (10:30 -0300)]
Bluetooth: Fix potential deadlock in hci_core
Since hdev->lock may be acquired by threads runnning in interrupt
context, all threads running in process context should disable
local bottom halve before locking hdev->lock. This can be done by
using hci_dev_lock_bh macro.
This way, we avoid potencial deadlocks like this one reported by
CONFIG_PROVE_LOCKING=y.
[ 304.788780] =================================
[ 304.789686] [ INFO: inconsistent lock state ]
[ 304.789686] 2.6.39+ #1
[ 304.789686] ---------------------------------
[ 304.789686] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 304.789686] ksoftirqd/0/3 [HC0[0]:SC1[1]:HE1:SE0] takes:
[ 304.789686] (&(&hdev->lock)->rlock){+.?...}, at: [<
ffffffffa000bbfe>] hci_conn_check_pending+0x38/0x76 [bluetooth]
[ 304.789686] {SOFTIRQ-ON-W} state was registered at:
[ 304.789686] [<
ffffffff8105188b>] __lock_acquire+0x347/0xd52
[ 304.789686] [<
ffffffff810526ac>] lock_acquire+0x8a/0xa7
[ 304.789686] [<
ffffffff812b3758>] _raw_spin_lock+0x2c/0x3b
[ 304.789686] [<
ffffffffa0009cf0>] hci_blacklist_del+0x1f/0x8a [bluetooth]
[ 304.789686] [<
ffffffffa00139fd>] hci_sock_ioctl+0x2d9/0x314 [bluetooth]
[ 304.789686] [<
ffffffff812197d8>] sock_ioctl+0x1f2/0x214
[ 304.789686] [<
ffffffff810b0fd6>] do_vfs_ioctl+0x46c/0x4ad
[ 304.789686] [<
ffffffff810b1059>] sys_ioctl+0x42/0x65
[ 304.789686] [<
ffffffff812b4892>] system_call_fastpath+0x16/0x1b
[ 304.789686] irq event stamp: 9768
[ 304.789686] hardirqs last enabled at (9768): [<
ffffffff812b40d4>] restore_args+0x0/0x30
[ 304.789686] hardirqs last disabled at (9767): [<
ffffffff812b3f6a>] save_args+0x6a/0x70
[ 304.789686] softirqs last enabled at (9726): [<
ffffffff8102fa9b>] __do_softirq+0x129/0x13f
[ 304.789686] softirqs last disabled at (9739): [<
ffffffff8102fb33>] run_ksoftirqd+0x82/0x133
[ 304.789686]
[ 304.789686] other info that might help us debug this:
[ 304.789686] Possible unsafe locking scenario:
[ 304.789686]
[ 304.789686] CPU0
[ 304.789686] ----
[ 304.789686] lock(&(&hdev->lock)->rlock);
[ 304.789686] <Interrupt>
[ 304.789686] lock(&(&hdev->lock)->rlock);
[ 304.789686]
[ 304.789686] *** DEADLOCK ***
[ 304.789686]
[ 304.789686] 1 lock held by ksoftirqd/0/3:
[ 304.789686] #0: (hci_task_lock){++.-..}, at: [<
ffffffffa0008353>] hci_rx_task+0x49/0x2f3 [bluetooth]
[ 304.789686]
[ 304.789686] stack backtrace:
[ 304.789686] Pid: 3, comm: ksoftirqd/0 Not tainted 2.6.39+ #1
[ 304.789686] Call Trace:
[ 304.789686] [<
ffffffff812ae901>] print_usage_bug+0x1e7/0x1f8
[ 304.789686] [<
ffffffff8100a796>] ? save_stack_trace+0x27/0x44
[ 304.789686] [<
ffffffff8104fc3f>] ? print_irq_inversion_bug.part.26+0x19a/0x19a
[ 304.789686] [<
ffffffff810504bb>] mark_lock+0x106/0x258
[ 304.789686] [<
ffffffff812b40d4>] ? retint_restore_args+0x13/0x13
[ 304.789686] [<
ffffffff81051817>] __lock_acquire+0x2d3/0xd52
[ 304.789686] [<
ffffffff8102be73>] ? vprintk+0x3ab/0x3d7
[ 304.789686] [<
ffffffff812ae126>] ? printk+0x3c/0x3e
[ 304.789686] [<
ffffffff810526ac>] lock_acquire+0x8a/0xa7
[ 304.789686] [<
ffffffffa000bbfe>] ? hci_conn_check_pending+0x38/0x76 [bluetooth]
[ 304.789686] [<
ffffffff811601c6>] ? __dynamic_pr_debug+0x10c/0x11a
[ 304.789686] [<
ffffffff812b3758>] _raw_spin_lock+0x2c/0x3b
[ 304.789686] [<
ffffffffa000bbfe>] ? hci_conn_check_pending+0x38/0x76 [bluetooth]
[ 304.789686] [<
ffffffffa000bbfe>] hci_conn_check_pending+0x38/0x76 [bluetooth]
[ 304.789686] [<
ffffffffa000c561>] hci_event_packet+0x38e/0x3e12 [bluetooth]
[ 304.789686] [<
ffffffff81052615>] ? lock_release+0x16c/0x179
[ 304.789686] [<
ffffffff812b3b41>] ? _raw_read_unlock+0x23/0x27
[ 304.789686] [<
ffffffffa0013e7f>] ? hci_send_to_sock+0x179/0x188 [bluetooth]
[ 304.789686] [<
ffffffffa00083d2>] hci_rx_task+0xc8/0x2f3 [bluetooth]
[ 304.789686] [<
ffffffff8102f5a9>] tasklet_action+0x87/0xe6
[ 304.789686] [<
ffffffff8102fa11>] __do_softirq+0x9f/0x13f
[ 304.789686] [<
ffffffff8102fb33>] run_ksoftirqd+0x82/0x133
[ 304.789686] [<
ffffffff8102fab1>] ? __do_softirq+0x13f/0x13f
[ 304.789686] [<
ffffffff81040f0a>] kthread+0x7f/0x87
[ 304.789686] [<
ffffffff812b55c4>] kernel_thread_helper+0x4/0x10
[ 304.789686] [<
ffffffff812b40d4>] ? retint_restore_args+0x13/0x13
[ 304.789686] [<
ffffffff81040e8b>] ? __init_kthread_worker+0x53/0x53
[ 304.789686] [<
ffffffff812b55c0>] ? gs_change+0x13/0x13
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 30 Jun 2011 22:20:56 +0000 (19:20 -0300)]
Bluetooth: Remove enable_smp parameter
The enable_smp parameter is no longer needed. It can be replaced by
checking lmp_host_le_capable.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 30 Jun 2011 22:20:55 +0000 (19:20 -0300)]
Bluetooth: Add lmp_host_le_capable() macro
Since we have the extended LMP features properly implemented, we
should check the LMP_HOST_LE bit to know if the host supports LE.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 30 Jun 2011 22:20:54 +0000 (19:20 -0300)]
Bluetooth: Add enable_le module parameter
This patch adds a new module parameter to enable/disable host LE
support. By default host LE support is disabled.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 30 Jun 2011 22:20:53 +0000 (19:20 -0300)]
Bluetooth: Write LE Host Supported command
This patch adds a handler to Write LE Host Supported command complete
events. Once this commands has completed successfully, we should
read the extended LMP features and update the extfeatures field in
hci_dev.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andre Guedes [Thu, 30 Jun 2011 22:20:52 +0000 (19:20 -0300)]
Bluetooth: Add extfeatures to struct hci_dev
This new field holds the extended LMP features value. Some LE
mechanism such as discovery procedure needs to read the extended
LMP features to work properly.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Mat Martineau [Wed, 29 Jun 2011 21:35:19 +0000 (14:35 -0700)]
Bluetooth: Check earlier for L2CAP ERTM frames to drop
Even when the received tx_seq is expected, the frame still needs to be
dropped if the TX window is exceeded or the receiver is in the local
busy state.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>