[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240923165558.GB9034@breakpoint.cc>
Date: Mon, 23 Sep 2024 18:55:58 +0200
From: Florian Westphal <fw@...len.de>
To: greearb@...delatech.com
Cc: netdev@...r.kernel.org, dsahern@...nel.org
Subject: Re: [PATCH] Revert "vrf: Remove unnecessary RCU-bh critical section"
greearb@...delatech.com <greearb@...delatech.com> wrote:
> diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
> index 4d8ccaf9a2b4..4087f72f0d2b 100644
> --- a/drivers/net/vrf.c
> +++ b/drivers/net/vrf.c
> @@ -608,7 +608,9 @@ static void vrf_finish_direct(struct sk_buff *skb)
> eth_zero_addr(eth->h_dest);
> eth->h_proto = skb->protocol;
>
> + rcu_read_lock_bh();
> dev_queue_xmit_nit(skb, vrf_dev);
> + rcu_read_unlock_bh();
[..]
> + * BH must be disabled before calling this.
Can you replace the rcu_read_lock_bh with plain local_bh_enable/disable?
I think that would make more sense.
Otherwise comment should explain why rcu read lock has to be held too,
I see no reason for it.
Powered by blists - more mailing lists