[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230609121610.2d3edd22@kernel.org>
Date: Fri, 9 Jun 2023 12:16:10 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, pabeni@...hat.com,
dsahern@...il.com
Subject: Re: [PATCH net-next 1/2] net: create device lookup API with
reference tracking
On Fri, 9 Jun 2023 20:50:07 +0200 Eric Dumazet wrote:
> > - dev = dev_get_by_index(net, ifindex);
> > + dev = netdev_get_by_index(net, ifindex, &req_info->dev_tracker,
> > + GFP_KERNEL);
> > if (!dev) {
> > NL_SET_ERR_MSG_ATTR(extack,
> > tb[ETHTOOL_A_HEADER_DEV_INDEX],
>
> You forgot to change dev_put(dev) at line 126
Oh, good catch!
> Oh well, this would need GFP_ATOMIC, I guess this might be the reason
> you kept netdev_tracker_alloc()
> that can run after rcu_read_unlock()
Yes :(
Powered by blists - more mailing lists