]> git.baikalelectronics.ru Git - kernel.git/commit
net: add might_sleep() call to napi_disable
authorJacob Keller <jacob.e.keller@intel.com>
Sat, 21 Sep 2013 05:05:39 +0000 (05:05 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 29 Oct 2013 09:40:21 +0000 (02:40 -0700)
commit65f500a3e2c519524d7b5917c2d7d1e30f9c02f3
tree4f80ae0bdf146705c932aa039fcb48d47626478e
parentf599c0cda81b2d93c3c4cece13de4f2f63048c7e
net: add might_sleep() call to napi_disable

napi_disable uses an msleep() call to wait for outstanding napi work to be
finished after setting the disable bit. It does not always sleep incase there
was no outstanding work. This resulted in a rare bug in ixgbe_down operation
where a napi_disable call took place inside of a local_bh_disable()d context.
In order to enable easier detection of future sleep while atomic BUGs, this
patch adds a might_sleep() call, so that every use of napi_disable during
atomic context will be visible.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: Alexander Duyck <alexander.duyck@intel.com>
Cc: Hyong-Youb Kim <hykim@myri.com>
Cc: Amir Vadai <amirv@mellanox.com>
Cc: Dmitry Kravkov <dmitry@broadcom.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
include/linux/netdevice.h