Re: [PATCH 4.19 008/114] nfp: flower: add rcu locks when accessing netdev for tunnels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux