From: David S. Miller Date: Wed, 12 Sep 2007 12:33:25 +0000 (+0200) Subject: [NET]: Add a might_sleep() to dev_close(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d5010db7ecfd6ec00119d3b185c4c0cd3265167;p=linux-beck.git [NET]: Add a might_sleep() to dev_close(). Requested by Johannes Berg. Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 215b8e97690a..d16dcab49c60 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1060,6 +1060,8 @@ int dev_open(struct net_device *dev) */ int dev_close(struct net_device *dev) { + might_sleep(); + if (!(dev->flags & IFF_UP)) return 0;