Re: Re: [PATCH] net: mctp: hold a reference to the route device in mctp_route_lookup()

Yiqi Sun <[email protected]>
Newsgroups gmane.linux.network,gmane.linux.kernel
Message-ID <[email protected]>
Hi Jeremy,

> Hi Aldo,
>
> > mctp_route_lookup() uses rt->dev without holding a reference on it.
>
> [...]
>
> > Take a reference with refcount_inc_not_zero() before touching rt->dev,
> > skip a device that is already dead, and drop the reference once the
> > destination has taken its own.
> 
> This looks the same as Yiqi Sun's analysis:
> 
>  https://lore.kernel.org/netdev/[email protected]=
> m/
>
> I had requested some simplifications for the proposed fix, which would
> likely result in something very close to your contribution here.
>
> Yiqi had not followed up from that review as yet, though; so if we don't
> see any updated patch shortly, then your implementation looks reasonable.
>
> Regards,
> 
>
> Jeremy

Sorry for the delay. I haven't had a chance to send v2 yet.

I've reviewed Aldo's patch, and the approach looks good to me. It addresses
the same issue I was trying to fix, so I'm happy for Aldo's patch to
supersede mine.

Thanks for picking this up, Aldo, and thanks for the review, Jeremy.

Regards,
Yiqi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.