lkml.org 
[lkml]   [2019]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 008/114] nfp: flower: add rcu locks when accessing netdev for tunnels
Hi!

> From: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.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

\
 
 \ /
  Last update: 2019-05-25 14:12    [W:0.935 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site