[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150823.164821.642841258349384154.davem@davemloft.net>
Date: Sun, 23 Aug 2015 16:48:21 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dsa@...ulusnetworks.com
Cc: steffen.klassert@...unet.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net af_key: Fix RCU splat
From: David Ahern <dsa@...ulusnetworks.com>
Date: Thu, 20 Aug 2015 08:51:40 -0700
> @@ -1670,7 +1670,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
> return -ENOBUFS;
> }
>
> - pfkey_broadcast(supp_skb, GFP_KERNEL, BROADCAST_REGISTERED, sk, sock_net(sk));
> + pfkey_broadcast(supp_skb, GFP_ATOMIC, BROADCAST_REGISTERED, sk, sock_net(sk));
As Eric alluded to, the gfp_t argument is totally pointless.
It is used inside of pfkey_broadcast() via calls to pfkey_broadcast_one() inside of
an RCU protected area _CREATED_ by pfkey_broadcast() itself.
Therefore it could never possibly honor a sleeping gfp_t flag, and GFP_ATOMIC must
always be used.
So just get rid of it and use GFP_ATOMIC unconditionally.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists