All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
	dsahern@gmail.com
Subject: Re: [PATCH net-next 1/2] net: create device lookup API with reference tracking
Date: Fri, 9 Jun 2023 12:16:10 -0700	[thread overview]
Message-ID: <20230609121610.2d3edd22@kernel.org> (raw)
In-Reply-To: <CANn89iK1mhsEhvT_aitD-G8gEd4Pqo6bB3kHYFUDiRQmiM_Bhg@mail.gmail.com>

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 :(

  reply	other threads:[~2023-06-09 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 18:32 [PATCH net-next 0/2] net: create device lookup API with reference tracking Jakub Kicinski
2023-06-09 18:32 ` [PATCH net-next 1/2] " Jakub Kicinski
2023-06-09 18:50   ` Eric Dumazet
2023-06-09 19:16     ` Jakub Kicinski [this message]
2023-06-09 18:57   ` Eric Dumazet
2023-06-09 18:59     ` Eric Dumazet
2023-06-09 18:32 ` [PATCH net-next 2/2] netpoll: allocate netdev tracker right away Jakub Kicinski
2023-06-09 18:46   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609121610.2d3edd22@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.