netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: <ehakim@nvidia.com>
Cc: <linux-kernel@vger.kernel.org>, <raeds@nvidia.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<netdev@vger.kernel.org>, <sd@queasysnail.net>,
	<atenart@kernel.org>, <jiri@resnulli.us>
Subject: Re: [PATCH net-next v4 1/2] macsec: add support for IFLA_MACSEC_OFFLOAD in macsec_changelink
Date: Thu, 8 Dec 2022 18:32:44 -0800	[thread overview]
Message-ID: <20221208183244.0365f63b@kernel.org> (raw)
In-Reply-To: <20221208115517.14951-1-ehakim@nvidia.com>

On Thu, 8 Dec 2022 13:55:16 +0200 ehakim@nvidia.com wrote:
> +	dev = get_dev_from_nl(genl_info_net(info), attrs);

What prevents this dev from disappearing before...

> +	if (IS_ERR(dev))
> +		return PTR_ERR(dev);
> +	if (!tb_offload[MACSEC_OFFLOAD_ATTR_TYPE])
> +		return -EINVAL;
> +
> +	offload = nla_get_u8(tb_offload[MACSEC_OFFLOAD_ATTR_TYPE]);
> +
> +	rtnl_lock();

... we finally take the lock?

I think you're just moving this code, but still.

> +	ret = macsec_update_offload(dev, offload);
>  
>  	rtnl_unlock();

  parent reply	other threads:[~2022-12-09  2:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 11:55 [PATCH net-next v4 1/2] macsec: add support for IFLA_MACSEC_OFFLOAD in macsec_changelink ehakim
2022-12-08 11:55 ` [PATCH net-next v2 2/2] macsec: dump IFLA_MACSEC_OFFLOAD attribute as part of macsec dump ehakim
2022-12-08 12:32   ` Jiri Pirko
2022-12-08 12:32 ` [PATCH net-next v4 1/2] macsec: add support for IFLA_MACSEC_OFFLOAD in macsec_changelink Jiri Pirko
2022-12-08 22:44 ` Sabrina Dubroca
2022-12-09  2:32 ` Jakub Kicinski [this message]
2022-12-09  2:33   ` Jakub Kicinski
2022-12-09 10:18     ` Emeel Hakim
2022-12-09 11:18       ` Emeel Hakim

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=20221208183244.0365f63b@kernel.org \
    --to=kuba@kernel.org \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ehakim@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raeds@nvidia.com \
    --cc=sd@queasysnail.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).