1. 23 1月, 2013 1 次提交
  2. 17 1月, 2013 2 次提交
    • C
      netpoll: fix a missing dev refcounting · 5bd30d39
      Cong Wang 提交于
      __dev_get_by_name() doesn't refcount the network device,
      so we have to do this by ourselves. Noticed by Eric.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bd30d39
    • C
      netpoll: fix a rtnl lock assertion failure · f92d3180
      Cong Wang 提交于
      v4: hold rtnl lock for the whole netpoll_setup()
      v3: remove the comment
      v2: use RCU read lock
      
      This patch fixes the following warning:
      
      [   72.013864] RTNL: assertion failed at net/core/dev.c (4955)
      [   72.017758] Pid: 668, comm: netpoll-prep-v6 Not tainted 3.8.0-rc1+ #474
      [   72.019582] Call Trace:
      [   72.020295]  [<ffffffff8176653d>] netdev_master_upper_dev_get+0x35/0x58
      [   72.022545]  [<ffffffff81784edd>] netpoll_setup+0x61/0x340
      [   72.024846]  [<ffffffff815d837e>] store_enabled+0x82/0xc3
      [   72.027466]  [<ffffffff815d7e51>] netconsole_target_attr_store+0x35/0x37
      [   72.029348]  [<ffffffff811c3479>] configfs_write_file+0xe2/0x10c
      [   72.030959]  [<ffffffff8115d239>] vfs_write+0xaf/0xf6
      [   72.032359]  [<ffffffff81978a05>] ? sysret_check+0x22/0x5d
      [   72.033824]  [<ffffffff8115d453>] sys_write+0x5c/0x84
      [   72.035328]  [<ffffffff819789d9>] system_call_fastpath+0x16/0x1b
      
      In case of other races, hold rtnl lock for the entire netpoll_setup() function.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f92d3180
  3. 09 1月, 2013 2 次提交
  4. 05 1月, 2013 1 次提交
  5. 12 12月, 2012 1 次提交
  6. 11 12月, 2012 1 次提交
  7. 20 9月, 2012 1 次提交
  8. 31 8月, 2012 1 次提交
  9. 30 8月, 2012 1 次提交
    • A
      netpoll: revert 6bdb7fe3 and fix be_poll() instead · 072a9c48
      Amerigo Wang 提交于
      Against -net.
      
      In the patch "netpoll: re-enable irq in poll_napi()", I tried to
      fix the following warning:
      
      [100718.051041] ------------[ cut here ]------------
      [100718.051048] WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x7d/0xb0()
      (Not tainted)
      [100718.051049] Hardware name: ProLiant BL460c G7
      ...
      [100718.051068] Call Trace:
      [100718.051073]  [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0
      [100718.051075]  [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20
      [100718.051077]  [<ffffffff810747ed>] ? local_bh_enable_ip+0x7d/0xb0
      [100718.051080]  [<ffffffff8150041b>] ? _spin_unlock_bh+0x1b/0x20
      [100718.051085]  [<ffffffffa00ee974>] ? be_process_mcc+0x74/0x230 [be2net]
      [100718.051088]  [<ffffffffa00ea68c>] ? be_poll_tx_mcc+0x16c/0x290 [be2net]
      [100718.051090]  [<ffffffff8144fe76>] ? netpoll_poll_dev+0xd6/0x490
      [100718.051095]  [<ffffffffa01d24a5>] ? bond_poll_controller+0x75/0x80 [bonding]
      [100718.051097]  [<ffffffff8144fde5>] ? netpoll_poll_dev+0x45/0x490
      [100718.051100]  [<ffffffff81161b19>] ? ksize+0x19/0x80
      [100718.051102]  [<ffffffff81450437>] ? netpoll_send_skb_on_dev+0x157/0x240
      
      by reenabling IRQ before calling ->poll, but it seems more
      problems are introduced after that patch:
      
      http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
      http://marc.info/?l=linux-netdev&m=134563282530588&w=2
      
      So it is safe to fix be2net driver code directly.
      
      This patch reverts the offending commit and fixes be_poll() by
      avoid disabling BH there, this is okay because be_poll()
      can be called either by poll_napi() which already disables
      IRQ, or by net_rx_action() which already disables BH.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Reported-by: NSylvain Munaut <s.munaut@whatever-company.com>
      Cc: Sylvain Munaut <s.munaut@whatever-company.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Sathya Perla <sathya.perla@emulex.com>
      Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
      Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Tested-by: NSylvain Munaut <s.munaut@whatever-company.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      072a9c48
  10. 15 8月, 2012 6 次提交
  11. 18 7月, 2012 1 次提交
  12. 14 6月, 2012 1 次提交
  13. 15 2月, 2012 1 次提交
  14. 02 2月, 2012 2 次提交
  15. 13 1月, 2012 1 次提交
  16. 30 11月, 2011 1 次提交
  17. 19 11月, 2011 1 次提交
    • H
      net: Remove all uses of LL_ALLOCATED_SPACE · ae641949
      Herbert Xu 提交于
      net: Remove all uses of LL_ALLOCATED_SPACE
      
      The macro LL_ALLOCATED_SPACE was ill-conceived.  It applies the
      alignment to the sum of needed_headroom and needed_tailroom.  As
      the amount that is then reserved for head room is needed_headroom
      with alignment, this means that the tail room left may be too small.
      
      This patch replaces all uses of LL_ALLOCATED_SPACE with the macro
      LL_RESERVED_SPACE and direct reference to needed_tailroom.
      
      This also fixes the problem with needed_headroom changing between
      allocating the skb and reserving the head room.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae641949
  18. 01 11月, 2011 1 次提交
  19. 27 8月, 2011 1 次提交
  20. 02 8月, 2011 1 次提交
  21. 04 7月, 2011 2 次提交
  22. 12 6月, 2011 1 次提交
  23. 09 6月, 2011 1 次提交
  24. 10 5月, 2011 1 次提交
    • A
      net: add mac_pton() for parsing MAC address · 4940fc88
      Alexey Dobriyan 提交于
      mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.
      
      mac_pton() doesn't dirty result until it's sure string representation is valid.
      
      mac_pton() doesn't care about characters _after_ last octet,
      it's up to caller to deal with it.
      
      mac_pton() diverges from 0/-E return value convention.
      Target usage:
      
      	if (!mac_pton(str, whatever->mac))
      		return -EINVAL;
      	/* ->mac being u8 [ETH_ALEN] is filled at this point. */
      	/* optionally check str[3 * ETH_ALEN - 1] for termination */
      
      Use mac_pton() in pktgen and netconsole for start.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4940fc88
  25. 23 4月, 2011 1 次提交
  26. 28 2月, 2011 2 次提交
  27. 20 12月, 2010 1 次提交
  28. 15 12月, 2010 1 次提交
    • T
      workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync() · afe2c511
      Tejun Heo 提交于
      cancel_rearming_delayed_work[queue]() has been superceded by
      cancel_delayed_work_sync() quite some time ago.  Convert all the
      in-kernel users.  The conversions are completely equivalent and
      trivial.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: netdev@vger.kernel.org
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Alex Elder <aelder@sgi.com>
      Cc: xfs-masters@oss.sgi.com
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: netfilter-devel@vger.kernel.org
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: linux-nfs@vger.kernel.org
      afe2c511
  29. 29 11月, 2010 1 次提交
  30. 20 10月, 2010 1 次提交
    • N
      netpoll: Revert napi_poll fix for bonding driver · f13d493d
      Neil Horman 提交于
      In an erlier patch I modified napi_poll so that devices with IFF_MASTER polled
      the per_cpu list instead of the device list for napi.  I did this because the
      bonding driver has no napi instances to poll, it instead expects to check the
      slave devices napi instances, which napi_poll was unaware of.  Looking at this
      more closely however, I now see this isn't strictly needed.  As the bond driver
      poll_controller calls the slaves poll_controller via netpoll_poll_dev, which
      recursively calls poll_napi on each slave, allowing those napi instances to get
      serviced.  The earlier patch isn't at all harmfull, its just not needed, so lets
      revert it to make the code cleaner.  Sorry for the noise,
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reviewed-by: NWANG Cong <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f13d493d