Skip to contentSkip to conversation

net: add rtnl assertion to linkwatch_run_queue

PATCH In review Denis Kirjanov 2 participants 2 messages May 27, 2010 – May 29, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: add rtnl assertion to linkwatch_run_queue

Add RTNL assertion to linkwatch_run_queue since function must be called with semaphore held

---
net/core/link_watch.c | 1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
net/core/link_watch.c +1 -0
index bdbce2f..e6d06c0 100644
@@ -220,6 +220,7 @@ void linkwatch_forget_dev(struct net_device *dev)
 /* Must be called with the rtnl semaphore held */
 void linkwatch_run_queue(void)
 {
+	ASSERT_RTNL();
 	__linkwatch_run_queue(0);
 }
 
maintainer
#1 lore raw

From: Denis Kirjanov <[email protected]>
Date: Thu, 27 May 2010 05:51:00 +0000

Quoted 4 lines

Add RTNL assertion to linkwatch_run_queue since function must be called with semaphore held

This function is exported purely for netdev_wait_allrefs()'s sake and for no other purpose.

In fact, I'd say this is entirely a private functional interface specifically built for generic network interface tear-down.

If you are trying to use this function in another context, that's something you need to discuss with us first before we start peppering it with various assertions.

I am not applying this patch.