Netdev List
 help / color / mirror / Atom feed
* [PATCH] macvtap: remove wrong sock_put() in macvtap_put_queue()
@ 2011-06-13  3:15 Jason Wang
  2011-06-17  2:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2011-06-13  3:15 UTC (permalink / raw)
  To: davem, arnd, netdev, linux-kernel; +Cc: Jason Wang

The calling of sock_put() should be delayed after synchronize_rcu(),
otherwise inconsist data may be seen during packets transmitting.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/macvtap.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 6696e56..ecdb775 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -148,7 +148,6 @@ static void macvtap_put_queue(struct macvtap_queue *q)
 
 		rcu_assign_pointer(vlan->taps[index], NULL);
 		rcu_assign_pointer(q->vlan, NULL);
-		sock_put(&q->sk);
 		--vlan->numvtaps;
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-17  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13  3:15 [PATCH] macvtap: remove wrong sock_put() in macvtap_put_queue() Jason Wang
2011-06-17  2:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox