Szymon Janc
50b78b2a65
NFC: Fix sleeping in atomic when releasing socket
nfc_llcp_socket_release is calling lock_sock/release_sock while holding
write lock for rwlock. Use bh_lock/unlock_sock instead.
BUG: sleeping function called from invalid context at net/core/sock.c:2138
in_atomic(): 1, irqs_disabled(): 0, pid: 56, name: kworker/1:1
4 locks held by kworker/1:1/56:
Pid: 56, comm: kworker/1:1 Not tainted 3.5.0-999-nfc+ #7
Call Trace:
[<ffffffff810952c5>] __might_sleep+0x145/0x200
[<ffffffff815d7686>] lock_sock_nested+0x36/0xa0
[<ffffffff81731569>] ? _raw_write_lock+0x49/0x50
[<ffffffffa04aa100>] ? nfc_llcp_socket_release+0x30/0x200 [nfc]
[<ffffffffa04aa122>] nfc_llcp_socket_release+0x52/0x200 [nfc]
[<ffffffffa04ab9f0>] nfc_llcp_mac_is_down+0x20/0x30 [nfc]
[<ffffffffa04a6fea>] nfc_dep_link_down+0xaa/0xf0 [nfc]
[<ffffffffa04a9bb5>] nfc_llcp_timeout_work+0x15/0x20 [nfc]
[<ffffffff810825f7>] process_one_work+0x197/0x7c0
[<ffffffff81082596>] ? process_one_work+0x136/0x7c0
[<ffffffff8172fbc9>] ? __schedule+0x419/0x9c0
[<ffffffffa04a9ba0>] ? nfc_llcp_build_gb+0x1b0/0x1b0 [nfc]
[<ffffffff81083090>] worker_thread+0x190/0x4c0
[<ffffffff81082f00>] ? rescuer_thread+0x2a0/0x2a0
[<ffffffff81088d1e>] kthread+0xae/0xc0
[<ffffffff810caafd>] ? trace_hardirqs_on+0xd/0x10
[<ffffffff8173acc4>] kernel_thread_helper+0x4/0x10
[<ffffffff81732174>] ? retint_restore_args+0x13/0x13
[<ffffffff81088c70>] ? flush_kthread_worker+0x150/0x150
[<ffffffff8173acc0>] ? gs_change+0x13/0x13
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-27 10:52:22 +02:00
..
2012-07-10 23:13:45 -07:00
2012-05-15 20:23:16 -04:00
2012-07-17 09:02:36 -07:00
2012-07-10 23:13:45 -07:00
2012-06-04 11:45:11 -04:00
2012-07-19 11:17:30 -07:00
2012-07-10 23:56:33 -07:00
2012-09-24 14:39:16 -04:00
2012-07-30 14:53:22 -07:00
2012-07-31 18:42:47 -07:00
2012-07-10 22:36:17 +02:00
2012-07-31 14:35:28 -07:00
2012-08-02 00:19:17 -07:00
2012-07-10 23:13:45 -07:00
2012-07-23 16:36:26 -07:00
2012-07-31 14:41:38 -07:00
2012-05-21 20:27:36 -07:00
2012-05-09 20:49:19 -04:00
2012-07-19 10:48:00 -07:00
2012-07-16 22:52:02 -07:00
2012-08-02 02:54:43 -07:00
2012-07-31 19:25:39 -07:00
2012-07-19 10:48:00 -07:00
2012-07-16 23:23:52 -07:00
2012-06-15 15:30:15 -07:00
2012-04-15 12:44:40 -04:00
2012-06-29 00:52:32 -07:00
2012-05-17 18:45:20 -04:00
2012-07-10 23:13:45 -07:00
2012-09-21 16:14:14 +02:00
2012-07-12 07:54:45 -07:00
2012-07-19 11:17:30 -07:00
2012-03-22 19:29:57 -04:00
2012-07-24 00:01:30 -07:00
2012-04-20 21:22:30 -04:00
2012-09-27 10:52:22 +02:00
2012-07-27 13:45:51 -07:00
2012-06-27 15:42:24 -07:00
2012-06-17 16:29:38 -07:00
2012-07-23 01:01:44 -07:00
2012-09-24 10:35:54 +02:00
2012-04-20 21:22:30 -04:00
2012-07-10 23:56:33 -07:00
2012-07-23 16:36:26 -07:00
2012-07-31 18:42:47 -07:00
2012-07-31 19:25:39 -07:00
2012-07-13 19:34:43 -04:00
2012-08-01 10:26:23 -07:00
2012-07-24 13:55:21 -07:00
2012-04-15 12:44:40 -04:00
2012-09-25 15:54:32 -04:00
2012-07-10 23:13:45 -07:00
2012-08-02 00:19:17 -07:00
2012-07-22 17:50:49 -07:00
2012-05-21 12:50:12 -07:00
2012-05-18 01:35:08 -04:00
2012-07-22 12:44:01 -07:00
2012-05-15 20:14:35 -04:00