1. 03 10月, 2012 1 次提交
    • L
      workqueue: avoid using deprecated functions · 916082b0
      Linus Torvalds 提交于
      The network merge brought in a few users of functions that got
      deprecated by the workqueue cleanups: the 'system_nrt_wq' is now the
      same as the regular system_wq, since all workqueues are now non-
      reentrant.
      
      Similarly, remove one use of flush_work_sync() - the regular
      flush_work() has become synchronous, and the "_sync()" version is thus
      deprecated as being superfluous.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      916082b0
  2. 27 9月, 2012 3 次提交
    • S
      NFC: Fix sleeping in atomic when releasing socket · 50b78b2a
      Szymon Janc 提交于
      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: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      50b78b2a
    • T
      NFC: LLCP raw socket support · 4463523b
      Thierry Escande 提交于
      This adds support for socket of type SOCK_RAW to LLCP.
      sk_buff are copied and sent to raw sockets with a 2 bytes extra header:
      The first byte header contains the nfc adapter index.
      The second one contains flags:
      - 0x01 - Direction (0=RX, 1=TX)
      - 0x02-0x80 - Reserved
      A raw socket has to be explicitly bound to a nfc adapter. This is achieved
      by specifying the adapter index to be bound to in the dev_idx field of the
      sockaddr_nfc_llcp struct passed to bind().
      Signed-off-by: NThierry Escande <thierry.escande@linux.intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      4463523b
    • S
      NFC: Use dynamic initialization for rwlocks · fe235b58
      Szymon Janc 提交于
      If rwlock is dynamically allocated but statically initialized it is
      missing proper lockdep annotation.
      
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      Pid: 3352, comm: neard Not tainted 3.5.0-999-nfc+ #2
      Call Trace:
      [<ffffffff810c8526>] __lock_acquire+0x8f6/0x1bf0
      [<ffffffff81739045>] ? printk+0x4d/0x4f
      [<ffffffff810c9eed>] lock_acquire+0x9d/0x220
      [<ffffffff81702bfe>] ? nfc_llcp_sock_from_sn+0x4e/0x160
      [<ffffffff81746724>] _raw_read_lock+0x44/0x60
      [<ffffffff81702bfe>] ? nfc_llcp_sock_from_sn+0x4e/0x160
      [<ffffffff81702bfe>] nfc_llcp_sock_from_sn+0x4e/0x160
      [<ffffffff817034a7>] nfc_llcp_get_sdp_ssap+0xa7/0x1b0
      [<ffffffff81706353>] llcp_sock_bind+0x173/0x210
      [<ffffffff815d9c94>] sys_bind+0xe4/0x100
      [<ffffffff8139209e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [<ffffffff8174ea69>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fe235b58
  3. 25 9月, 2012 2 次提交
  4. 10 7月, 2012 8 次提交
  5. 05 6月, 2012 9 次提交
  6. 16 5月, 2012 1 次提交
  7. 13 4月, 2012 4 次提交
  8. 07 3月, 2012 9 次提交
  9. 20 12月, 2011 2 次提交
  10. 15 12月, 2011 1 次提交
    • S
      NFC: Initial LLCP support · d646960f
      Samuel Ortiz 提交于
      This patch is an initial implementation for the NFC Logical Link Control
      protocol. It's also known as NFC peer to peer mode.
      This is a basic implementation as it lacks SDP (services Discovery
      Protocol), frames aggregation support, and frame rejecion parsing.
      Follow up patches will implement those missing features.
      This code has been tested against a Nexus S phone implementing LLCP 1.0.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d646960f