Subject: Re: [net PATCH] xdp: obtain the mem_id mutex before trying to remove an entry.

From: Jesper Dangaard Brouer <[email-masked]>
Date: Wed, 4 Dec 2019 12:38:29 +0100

On Wed, 4 Dec 2019 12:07:22 +0200
Grygorii Strashko <[email-masked]> wrote:

> On 04/12/2019 10:32, Jesper Dangaard Brouer wrote:
> > On Tue, 3 Dec 2019 14:01:14 -0800
> > Jonathan Lemon <[email-masked]> wrote:
> >   
> >> A lockdep splat was observed when trying to remove an xdp memory
> >> model from the table since the mutex was obtained when trying to
> >> remove the entry, but not before the table walk started:
> >>
> >> Fix the splat by obtaining the lock before starting the table walk.
> >>
> >> Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.")
> >> Reported-by: Grygorii Strashko <[email-masked]>
> >> Signed-off-by: Jonathan Lemon <[email-masked]>  
> > 
> > Have you tested if this patch fix the problem reported by Grygorii?
> > 
> > Link: https://lore.kernel.org/netdev/[email-masked]
> > 
> > Grygorii can you test this?  
> 
> Thanks.
> I do not see this trace any more and networking is working after if down/up
> 
> Tested-by: Grygorii Strashko <[email-masked]>
> 

Well if it fixes you issue, then I guess its okay.

Acked-by: Jesper Dangaard Brouer <[email-masked]>

I just though it was related to the rcu_read_lock() around the
page_pool_destroy() call. Guess, I was wrong.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer