1. 08 10月, 2012 1 次提交
  2. 07 10月, 2012 2 次提交
    • E
      net: remove skb recycling · acb600de
      Eric Dumazet 提交于
      Over time, skb recycling infrastructure got litle interest and
      many bugs. Generic rx path skb allocation is now using page
      fragments for efficient GRO / TCP coalescing, and recyling
      a tx skb for rx path is not worth the pain.
      
      Last identified bug is that fat skbs can be recycled
      and it can endup using high order pages after few iterations.
      
      With help from Maxime Bizon, who pointed out that commit
      87151b86 (net: allow pskb_expand_head() to get maximum tailroom)
      introduced this regression for recycled skbs.
      
      Instead of fixing this bug, lets remove skb recycling.
      
      Drivers wanting really hot skbs should use build_skb() anyway,
      to allocate/populate sk_buff right before netif_receive_skb()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Maxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acb600de
    • G
      netlink: add reference of module in netlink_dump_start · 6dc878a8
      Gao feng 提交于
      I get a panic when I use ss -a and rmmod inet_diag at the
      same time.
      
      It's because netlink_dump uses inet_diag_dump which belongs to module
      inet_diag.
      
      I search the codes and find many modules have the same problem.  We
      need to add a reference to the module which the cb->dump belongs to.
      
      Thanks for all help from Stephen,Jan,Eric,Steffen and Pablo.
      
      Change From v3:
      change netlink_dump_start to inline,suggestion from Pablo and
      Eric.
      
      Change From v2:
      delete netlink_dump_done,and call module_put in netlink_dump
      and netlink_sock_destruct.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6dc878a8
  3. 06 10月, 2012 2 次提交
  4. 05 10月, 2012 7 次提交
  5. 03 10月, 2012 3 次提交
  6. 02 10月, 2012 9 次提交
  7. 29 9月, 2012 1 次提交
  8. 28 9月, 2012 12 次提交
  9. 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
    • S
      NFC: Fix sleeping in invalid context when netlink socket is closed · 3c0cc8aa
      Szymon Janc 提交于
      netlink_register_notifier requires notify functions to not sleep.
      nfc_stop_poll locks device mutex and must not be called from notifier.
      Create workqueue that will handle this for all devices.
      
      BUG: sleeping function called from invalid context at kernel/mutex.c:269
      in_atomic(): 0, irqs_disabled(): 0, pid: 4497, name: neard
      1 lock held by neard/4497:
      Pid: 4497, comm: neard Not tainted 3.5.0-999-nfc+ #5
      Call Trace:
      [<ffffffff810952c5>] __might_sleep+0x145/0x200
      [<ffffffff81743dde>] mutex_lock_nested+0x2e/0x50
      [<ffffffff816ffd19>] nfc_stop_poll+0x39/0xb0
      [<ffffffff81700a17>] nfc_genl_rcv_nl_event+0x77/0xc0
      [<ffffffff8174aa8c>] notifier_call_chain+0x5c/0x120
      [<ffffffff8174abd6>] __atomic_notifier_call_chain+0x86/0x140
      [<ffffffff8174ab50>] ? notifier_call_chain+0x120/0x120
      [<ffffffff815e1347>] ? skb_dequeue+0x67/0x90
      [<ffffffff8174aca6>] atomic_notifier_call_chain+0x16/0x20
      [<ffffffff8162119a>] netlink_release+0x24a/0x280
      [<ffffffff815d7aa8>] sock_release+0x28/0xa0
      [<ffffffff815d7be7>] sock_close+0x17/0x30
      [<ffffffff811b2a7c>] __fput+0xcc/0x250
      [<ffffffff811b2c0e>] ____fput+0xe/0x10
      [<ffffffff81085009>] task_work_run+0x69/0x90
      [<ffffffff8101b951>] do_notify_resume+0x81/0xd0
      [<ffffffff8174ef22>] int_signal+0x12/0x17
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      3c0cc8aa
    • J
      NFC: Add dummy nfc_llc_shdlc_register definition · 7d777c3d
      John W. Linville 提交于
      This is used when CONFIG_NFC_SHDLC is disabled.
      Reported-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      7d777c3d