Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2036405rwb; Thu, 8 Dec 2022 19:18:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Fx+4HYclnsCaa2PdIiIONkUR87luX1fCcXmk+nPghVyZdWiDpRXq2yzyV+GNdP6nEnV9/ X-Received: by 2002:a17:906:a050:b0:7a4:bbce:ddae with SMTP id bg16-20020a170906a05000b007a4bbceddaemr3843400ejb.59.1670555881728; Thu, 08 Dec 2022 19:18:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670555881; cv=none; d=google.com; s=arc-20160816; b=lcU8wwGYmHYTC4+FiMvazKz0pc7qezeEGYbv+g2V/YQxn4b5jQ85OHarldfzbzWYME i6+Hug/4aIvjJOYWsecOzTZSw+T4z0Crp4yiHY/gKr8BSAx4PwWTf7+n6pS05VjxfYtY rT/si728mLqJVNX6nfAlpD3l57MSV2mnTvBi+iqE6cFnRfM7d0BAuxShRBP0e0+R5BW/ 0uq1UpHKL/jRRsFr63j2bGZ2vzRf9ftT49sMbWZ6lbwaR+HouEmlwvhmN9GaIe8B66+9 kVl+Y7jbseFgTruQ7oOt/buJoOdliedw7bv32wbBwAv+BulK2BlwvmeQobRLNiLjlXlq nPNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=MF0b2fzaQTVhEkB3NPHHOFyVFQozUkIEUuytnegPJUw=; b=vN9YdlBaJI4W6wZPztk/JtWMzTh9my4vleXijMa4LvFhz6K2eIu+Vu/ohc3wFUcK8w 7CbqkV6J+UPgNw50eWW1oJ5Ck1VEj2DdegrhVIUwrHnqGQVa4Sd3+31W3vTn/iqpteFX vhLu5iCZr5ZjbsIDoDaopJkIpKpGoWtC/cJm1q6fAUpnLd0uj71ClPJjo6VZwaMEJYly Zocmc/rTh/Pv1avHcmOGZU54ps6Sz130WrNLWCvKO2YPOK+ATWB2K7QYV0zikVhZjGD2 ZBb8I1d4j+BONidTq99jSLu/slSwAzpWkV38krZ0E9QH/s+w+HA+vYD+ntDiZbrKS657 s9yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pu+JQvBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd13-20020a170907078d00b007c1292a824asi197871ejb.731.2022.12.08.19.17.43; Thu, 08 Dec 2022 19:18:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pu+JQvBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbiLICcx (ORCPT + 73 others); Thu, 8 Dec 2022 21:32:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiLICcv (ORCPT ); Thu, 8 Dec 2022 21:32:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DD8C248D1; Thu, 8 Dec 2022 18:32:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 02246B8270D; Fri, 9 Dec 2022 02:32:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 431A2C433EF; Fri, 9 Dec 2022 02:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670553165; bh=66YHqkbUz9ICPV7H8paDpaZ9/YWiJiIvaPjUkb0Y3DI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pu+JQvBBOujIrrhp5ay1lDV61pqlOjPPst+T9VGJR2+H3VJJPCFlMLBLadlQx7vrt nBqwm93Zr46Pg5YhPliBdUqJvQ75WPsCu0sR3bjjiBop5D0yTL4Vxi4BwiKJljpbWt IhPKa09uWZe+GG7PXxaCJgdktAPUWTQCOBCxR3/u5vcogVCsss9xuLexkMXtbnLFpn dYtg1mZuAPXjjEhRPLqOLqarbZY07podNBm7m0U6UrfxDHGndNPm9VZBl0UikB74M5 bTkMIb5OnzvBNwCnpG9JaUAAgyIoemNAY4wgcHiUmYd9NmRiBvFxpJ7AhjDdux4MJY ZgUDaQ+ZWDRZw== Date: Thu, 8 Dec 2022 18:32:44 -0800 From: Jakub Kicinski To: Cc: , , , , , , , , Subject: Re: [PATCH net-next v4 1/2] macsec: add support for IFLA_MACSEC_OFFLOAD in macsec_changelink Message-ID: <20221208183244.0365f63b@kernel.org> In-Reply-To: <20221208115517.14951-1-ehakim@nvidia.com> References: <20221208115517.14951-1-ehakim@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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();