Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3060189ybb; Sun, 22 Mar 2020 14:26:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtZoeynqRwlJkYEzlGYF5uMa+WuXESVt18tzjRkzNdyUhuf5PL16+yuwSbX7sAWUSbfJciX X-Received: by 2002:a05:6830:1193:: with SMTP id u19mr15965447otq.190.1584912405417; Sun, 22 Mar 2020 14:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584912405; cv=none; d=google.com; s=arc-20160816; b=MCLTKBzdZdK15NXiAbjhh6tpQy4lDFQ8yQX9T77BEDWu6xzk+/uDcJPV9LIPibd5sI cuZxDz2G0n1p3PNjxokBggS5Xb8OVUhBT74Txl2/VZ6EBWq5F/7awWuG7eE2RdNX3ufF x6eoImvxwWYBApy5sDkAk+JHCpk5zbv9JyuXy5jRUoQvNvKPAMyr0hrTrGmJT3w10HlR j7dXwkds6BSdCUlwx0Mcmo5vEvzcA1fAvqs/WDQWNpzUgtdcYNiX/OVBy6TZJHzQkJ1c BwIzFUKiA1UTq6y6imL/xjj/kJpAZGfHUnl+LshQxIrB1hsB09CG24D9P/lP4Sw5o/YP P/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DdK8zZfnv1rdb+joHHL3hObvbFuV2hKvbK/Yl7XVTbw=; b=I3tRkActzbLex7tVicWZ1B9V5L4V9MeGnQfFyEMGWi6GYTEQLmchK3zxZCVYZIbLob dv/j0cdzf6UZwPkVCzBh8a6R3RC+Fk4aDiZvjkAU8egoMYiggNiFszdDb2r2sLu4UgSK kKI3AEcZIMGaFlgglKAJMOcIVrW8cl5kEN2wPJbDAUFaIKJjIK94QUSGEdns9EutgPW/ 6ujR/Qgmlg/Z7X/Z0YnuIzJooG3m5LacWab84seFIatyW9cInI097pW6/xypAAEXJR3x vcMTTeju4Y0Fo2FU3HSmFTR0iyyitBKMJIpOyhq+2RaXqDatZEf9jQ7iOKLID2znMRu0 DqIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q27si6528225otc.310.2020.03.22.14.26.33; Sun, 22 Mar 2020 14:26:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbgCVVZL (ORCPT + 99 others); Sun, 22 Mar 2020 17:25:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:57224 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbgCVVZL (ORCPT ); Sun, 22 Mar 2020 17:25:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A3A79AB7F; Sun, 22 Mar 2020 21:25:09 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 5698EE0FD3; Sun, 22 Mar 2020 22:25:09 +0100 (CET) Date: Sun, 22 Mar 2020 22:25:09 +0100 From: Michal Kubecek To: Jakub Kicinski Cc: "David S. Miller" , netdev@vger.kernel.org, Andrew Lunn , linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ethtool: fix reference leak in some *_SET handlers Message-ID: <20200322212509.GG31519@unicorn.suse.cz> References: <20200322201551.E11BAE0FD3@unicorn.suse.cz> <20200322134356.55f7d9b8@kicinski-fedora-PC1C0HJN> <20200322205109.GF31519@unicorn.suse.cz> <20200322140623.633d3446@kicinski-fedora-PC1C0HJN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200322140623.633d3446@kicinski-fedora-PC1C0HJN> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 22, 2020 at 02:06:23PM -0700, Jakub Kicinski wrote: > On Sun, 22 Mar 2020 21:51:09 +0100 Michal Kubecek wrote: > > On Sun, Mar 22, 2020 at 01:43:56PM -0700, Jakub Kicinski wrote: > > > On Sun, 22 Mar 2020 21:15:51 +0100 (CET) Michal Kubecek wrote: > > > > Andrew noticed that some handlers for *_SET commands leak a netdev > > > > reference if required ethtool_ops callbacks do not exist. A simple > > > > reproducer would be e.g. > > > > > > > > ip link add veth1 type veth peer name veth2 > > > > ethtool -s veth1 wol g > > > > ip link del veth1 > > > > > > > > Make sure dev_put() is called when ethtool_ops check fails. > > > > > > Fixes: e54d04e3afea ("ethtool: set message mask with DEBUG_SET request") > > > Fixes: a53f3d41e4d3 ("ethtool: set link settings with LINKINFO_SET request") > > > Fixes: bfbcfe2032e7 ("ethtool: set link modes related data with LINKMODES_SET request") > > > Fixes: 8d425b19b305 ("ethtool: set wake-on-lan settings with WOL_SET request") > > > > Yes, thank you, I forgot about Fixes tags. > > > > Should I resubmit or will patchworks pick the tags from your reply? > > Patchwork sees them, I think, but I don't think it adds them to the > patch as downloaded by git-pw. Probably easiest to repost. Sent v2 with Fixes and Reviewed-by tags. Michal > > > > Reported-by: Andrew Lunn > > > > Signed-off-by: Michal Kubecek > > > > > > Reviewed-by: Jakub Kicinski >