public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCH] net/ipv6: Use GFP_ATOMIC when a lock is held
@ 2010-05-30 19:48 Julia Lawall
  2010-05-30 20:11 ` Eric Dumazet
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2010-05-30 19:48 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI <yosh

From: Julia Lawall <julia@diku.dk>

A spin lock is taken near the beginning of the enclosing function.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

spin_lock(...)
... when != spin_unlock(...)
-GFP_KERNEL
+GFP_ATOMIC
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 net/ipv6/sit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/net/ipv6/sit.c b/net/ipv6/sit.c
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -358,7 +358,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t
 		goto out;
 	}
 
-	p = kzalloc(sizeof(struct ip_tunnel_prl_entry), GFP_KERNEL);
+	p = kzalloc(sizeof(struct ip_tunnel_prl_entry), GFP_ATOMIC);
 	if (!p) {
 		err = -ENOBUFS;
 		goto out;

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

end of thread, other threads:[~2010-06-01  7:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-30 19:48 Subject: [PATCH] net/ipv6: Use GFP_ATOMIC when a lock is held Julia Lawall
2010-05-30 20:11 ` Eric Dumazet
2010-05-30 20:50   ` Julia Lawall
2010-05-30 20:55     ` Eric Dumazet
2010-05-30 21:09       ` Julia Lawall
2010-05-30 21:18         ` Eric Dumazet
2010-05-31  5:04         ` [PATCH] ipv6: get rid of ipip6_prl_lock Eric Dumazet
2010-06-01  7:27           ` David Miller

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