Re: [PATCH net-next] net: pktgen: return bool from __pktgen_NN_threads()
From: Paolo Abeni
Date: Thu Aug 27 2026 - 04:19:53 EST
On 8/25/26 8:53 PM, Chengfeng Ye wrote:
> Callers of __pktgen_NN_threads() only check whether a pktgen_dev was
> found. After the RCU lookup they never dereference the returned
> pointer, so returning it past rcu_read_unlock() is confusing.
>
> Return bool instead and keep the pktgen_dev pointer local to the
> RCU critical section.
>
> Suggested-by: Paolo Abeni <pabeni@xxxxxxxxxx>
> Signed-off-by: Chengfeng Ye <nicoyip.dev@xxxxxxxxx>
## Form letter - net-next-closed
net-next pull request for v7.3 has already been merged, and therefore
the net-next tree is closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.
Please repost when net-next reopens after Aug 31st.
RFC patches sent for review only are obviously welcome at any time.
See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer
pv-bot: closed