1. 17 1月, 2014 1 次提交
  2. 15 1月, 2014 1 次提交
  3. 19 11月, 2013 1 次提交
    • M
      xen-netfront: fix missing rx_refill_timer when allocate memory failed · fdcf7765
      Ma JieYue 提交于
      There was a bug in xennet_alloc_rx_buffers, when allocating page or
      sk_buff failed, and at the same time rx_batch queue not empty,
      the rx_refill_timer timer won't be scheduled. If finally the remaining
      request buffers in rx ring less than what backend driver expected,
      the backend driver would think of rx ring as full and start dropping packets.
      In such situation, there is no way for the netfront driver to recover
      automatically, so that the device can not work properly.
      
      The patch fixes the problem by always scheduling rx_refill_timer timer when
      alloc_page or __netdev_alloc_skb fails, no matter whether rx_batch queue is
      empty or not. It ensures that the rx ring request buffers will finally meet
      the backend needs.
      Signed-off-by: NMa JieYue <jieyue.majy@alibaba-inc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fdcf7765
  4. 06 11月, 2013 1 次提交
    • J
      net: Explicitly initialize u64_stats_sync structures for lockdep · 827da44c
      John Stultz 提交于
      In order to enable lockdep on seqcount/seqlock structures, we
      must explicitly initialize any locks.
      
      The u64_stats_sync structure, uses a seqcount, and thus we need
      to introduce a u64_stats_init() function and use it to initialize
      the structure.
      
      This unfortunately adds a lot of fairly trivial initialization code
      to a number of drivers. But the benefit of ensuring correctness makes
      this worth while.
      
      Because these changes are required for lockdep to be enabled, and the
      changes are quite trivial, I've not yet split this patch out into 30-some
      separate patches, as I figured it would be better to get the various
      maintainers thoughts on how to best merge this change along with
      the seqcount lockdep enablement.
      
      Feedback would be appreciated!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Roger Luethi <rl@hellgate.ch>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Wensong Zhang <wensong@linux-vs.org>
      Cc: netdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      827da44c
  5. 03 10月, 2013 1 次提交
  6. 18 7月, 2013 1 次提交
    • J
      xen-netfront: pull on receive skb may need to happen earlier · 093b9c71
      Jan Beulich 提交于
      Due to commit 3683243b ("xen-netfront: use __pskb_pull_tail to ensure
      linear area is big enough on RX") xennet_fill_frags() may end up
      filling MAX_SKB_FRAGS + 1 fragments in a receive skb, and only reduce
      the fragment count subsequently via __pskb_pull_tail(). That's a
      result of xennet_get_responses() allowing a maximum of one more slot to
      be consumed (and intermediately transformed into a fragment) if the
      head slot has a size less than or equal to RX_COPY_THRESHOLD.
      
      Hence we need to adjust xennet_fill_frags() to pull earlier if we
      reached the maximum fragment count - due to the described behavior of
      xennet_get_responses() this guarantees that at least the first fragment
      will get completely consumed, and hence the fragment count reduced.
      
      In order to not needlessly call __pskb_pull_tail() twice, make the
      original call conditional upon the pull target not having been reached
      yet, and defer the newly added one as much as possible (an alternative
      would have been to always call the function right before the call to
      xennet_fill_frags(), but that would imply more frequent cases of
      needing to call it twice).
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Acked-by: NWei Liu <wei.liu2@citrix.com>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: stable@vger.kernel.org (3.6 onwards)
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      093b9c71
  7. 02 7月, 2013 1 次提交
  8. 11 6月, 2013 1 次提交
  9. 24 5月, 2013 1 次提交
  10. 21 5月, 2013 1 次提交
  11. 23 4月, 2013 2 次提交
  12. 26 3月, 2013 2 次提交
  13. 08 1月, 2013 1 次提交
  14. 08 12月, 2012 1 次提交
  15. 04 12月, 2012 1 次提交
  16. 22 11月, 2012 1 次提交
  17. 31 8月, 2012 1 次提交
  18. 15 8月, 2012 1 次提交
  19. 09 8月, 2012 1 次提交
  20. 27 6月, 2012 1 次提交
  21. 23 5月, 2012 1 次提交
  22. 07 4月, 2012 1 次提交
  23. 22 3月, 2012 1 次提交
  24. 01 2月, 2012 1 次提交
  25. 27 1月, 2012 1 次提交
  26. 25 1月, 2012 1 次提交
  27. 05 1月, 2012 1 次提交
    • J
      Xen: consolidate and simplify struct xenbus_driver instantiation · 73db144b
      Jan Beulich 提交于
      The 'name', 'owner', and 'mod_name' members are redundant with the
      identically named fields in the 'driver' sub-structure. Rather than
      switching each instance to specify these fields explicitly, introduce
      a macro to simplify this.
      
      Eliminate further redundancy by allowing the drvname argument to
      DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
      the ID table will be used for .driver.name).
      
      Also eliminate the questionable xenbus_register_{back,front}end()
      wrappers - their sole remaining purpose was the checking of the
      'owner' field, proper setting of which shouldn't be an issue anymore
      when the macro gets used.
      
      v2: Restore DRV_NAME for the driver name in xen-pciback.
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      73db144b
  28. 13 12月, 2011 1 次提交
  29. 17 11月, 2011 2 次提交
  30. 19 10月, 2011 1 次提交
  31. 06 10月, 2011 1 次提交
  32. 22 6月, 2011 1 次提交
  33. 26 5月, 2011 1 次提交
    • I
      xen: netfront: hold RTNL when updating features. · 1ba37c51
      Ian Campbell 提交于
      Konrad reports:
      [    0.930811] RTNL: assertion failed at /home/konrad/ssd/linux/net/core/dev.c (5258)
      [    0.930821] Pid: 22, comm: xenwatch Not tainted 2.6.39-05193-gd762f438 #1
      [    0.930825] Call Trace:
      [    0.930834]  [<ffffffff8143bd0e>] __netdev_update_features+0xae/0xe0
      [    0.930840]  [<ffffffff8143dd41>] netdev_update_features+0x11/0x30
      [    0.930847]  [<ffffffffa0037105>] netback_changed+0x4e5/0x800 [xen_netfront]
      [    0.930854]  [<ffffffff8132a838>] xenbus_otherend_changed+0xa8/0xb0
      [    0.930860]  [<ffffffff8157ca99>] ? _raw_spin_unlock_irqrestore+0x19/0x20
      [    0.930866]  [<ffffffff8132adfe>] backend_changed+0xe/0x10
      [    0.930871]  [<ffffffff8132875a>] xenwatch_thread+0xba/0x180
      [    0.930876]  [<ffffffff810a8ba0>] ? wake_up_bit+0x40/0x40
      [    0.930881]  [<ffffffff813286a0>] ? split+0xf0/0xf0
      [    0.930886]  [<ffffffff810a8646>] kthread+0x96/0xa0
      [    0.930891]  [<ffffffff815855a4>] kernel_thread_helper+0x4/0x10
      [    0.930896]  [<ffffffff815846b3>] ? int_ret_from_sys_call+0x7/0x1b
      [    0.930901]  [<ffffffff8157cf61>] ? retint_restore_args+0x5/0x6
      [    0.930906]  [<ffffffff815855a0>] ? gs_change+0x13/0x13
      
      This update happens in xenbus watch callback context and hence does not already
      hold the rtnl. Take the lock as necessary.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ba37c51
  34. 05 4月, 2011 1 次提交
  35. 04 4月, 2011 1 次提交
  36. 02 4月, 2011 1 次提交
  37. 31 3月, 2011 1 次提交
    • J
      drivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers · ab392d2d
      Javier Martinez Canillas 提交于
      The IRQF_SAMPLE_RANDOM flag is marked as deprecated and will be removed.
      
      Every input point to the kernel's entropy pool have to better document the
      type of entropy source it is.
      
      drivers/char/random.c now implements a set of interfaces that can be used for
      devices to collect enviromental noise. IRQF_SAMPLE_RANDOM will be replaced
      with these add_*_randomness exported functions.
      
      Network drivers are not a good source of entropy. They use as a source of
      entropy essentially a remote host. Which means that the source of entropy can
      be potentially controlled by an attacker. Also, with heavy workloads the
      entropy decreases due to less hardware interrupts happening thanks to irq
      mitigation and NAPI.
      
      If a system relies in its network interface as a entropy source it has a false
      sense of security. Systems that don't have devices whose drivers are good
      sources of entropy, should either use a hardware random number generator or
      feed the kernel's entropy pool from userspace using other sources of entropy
      such as EGD, video_entropyd, timer_entropyd and audio-entropyd.
      Signed-off-by: NJavier Martinez Canillas <martinez.javier@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab392d2d