[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221208183244.0365f63b@kernel.org>
Date: Thu, 8 Dec 2022 18:32:44 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: <ehakim@...dia.com>
Cc: <linux-kernel@...r.kernel.org>, <raeds@...dia.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <sd@...asysnail.net>,
<atenart@...nel.org>, <jiri@...nulli.us>
Subject: Re: [PATCH net-next v4 1/2] macsec: add support for
IFLA_MACSEC_OFFLOAD in macsec_changelink
On Thu, 8 Dec 2022 13:55:16 +0200 ehakim@...dia.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();
Powered by blists - more mailing lists