[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190525121159.GA1376@xo-6d-61-c0.localdomain>
Date: Sat, 25 May 2019 14:11:59 +0200
From: Pavel Machek <pavel@....cz>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Pieter Jansen van Vuuren
<pieter.jansenvanvuuren@...ronome.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
John Hurley <john.hurley@...ronome.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 4.19 008/114] nfp: flower: add rcu locks when accessing
netdev for tunnels
Hi!
> From: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@...ronome.com>
>
> [ Upstream commit cb07d915bf278a7a3938b983bbcb4921366b5eff ]
>
> Add rcu locks when accessing netdev when processing route request
> and tunnel keep alive messages received from hardware.
> /* Get the neighbour entry for the lookup */
> n = dst_neigh_lookup(&rt->dst, &flow.daddr);
> ip_rt_put(rt);
> if (!n)
> - goto route_fail_warning;
> - nfp_tun_write_neigh(n->dev, app, &flow, n, GFP_KERNEL);
> + goto fail_rcu_unlock;
> + nfp_tun_write_neigh(n->dev, app, &flow, n, GFP_ATOMIC);
> neigh_release(n);
> + rcu_read_unlock();
> return;
This will make allocations more likely to fail. I thought it is okay to sleep in
rcu lock critical sections...?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Powered by blists - more mailing lists