Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3039438ybb; Sun, 22 Mar 2020 13:52:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtHykh8dxkwy2CrQ5ficaZkUECCQm3ws8RVH3IlyPDuESaP+/jXIzhW9c0Nure6EFLATd/b X-Received: by 2002:aca:5210:: with SMTP id g16mr15249619oib.174.1584910335226; Sun, 22 Mar 2020 13:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584910335; cv=none; d=google.com; s=arc-20160816; b=CwBWdOEb1bREvaVrMehz7qCKUnb9hTyFZS581PliGqPgEfgBaJjG1SlCdjiZdMhzB0 XL/AbROe3W2nJZ4e/zYLaaGtfE5zAXG4tOO2x7mO2YM8o/lWmmkAXq1568q0E28sfQHs 7L8+6vP0mnuBEhBDYWj6ZCq9wTPycXLjKlPoTgr+8IJQoItM87UIhGSb3+6T6nuG3eQP Nvg7+A1EtR412X1sg5EcPvAfXqxcjRJ3z9Ue6grwDgVL9e2GF2QEV0fjj8jDYQcfoNS7 Ra7Mdg0FWCNXBX/8A94W6FOjQGDMBhsHkHNDAAUxoVUCRIre2WHd1lp/SuWFSCJY5i/B Ao4Q== 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=wGtSH4fnOVG+1Cl+IVM600vvSB8EoJ3J2BhC3HShy48=; b=iG/gav4K3H+WGUab7bUj9xNRGXBUADe4E8X9jLKCwkQhspFB7sg4gHO75X80iETy+x IcSoecZhf1UnM5W36Qa3M4oTYYKvpQ8oorzr1ZDBQmRzX4wPethnXJkLI7rQNKQpTu8x V7OnGFOSSbMBo7HZEkpE1OTBcv5T2p+Q84LBmZrw/qBVh4RSnf9ldLJlZa5SufWEoepE JWuuKgr4kEjV1nP+g140lt8sieBJJoZpF8VKYNbAHyW4kPATD55nRnc9GJcK79Nhsxo7 U7rthrAL44w1FKVavGfzV3H/+xIkVrjwOQ2XBdRDIVIxFGxDh4bt7LjV/j0wp1N3a7By 7OVg== 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 j11si6113130ota.85.2020.03.22.13.52.00; Sun, 22 Mar 2020 13:52:15 -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 S1726847AbgCVUvM (ORCPT + 99 others); Sun, 22 Mar 2020 16:51:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:51420 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbgCVUvM (ORCPT ); Sun, 22 Mar 2020 16:51:12 -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 8E084AD3F; Sun, 22 Mar 2020 20:51:10 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id BCC1FE0FD3; Sun, 22 Mar 2020 21:51:09 +0100 (CET) Date: Sun, 22 Mar 2020 21:51: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: <20200322205109.GF31519@unicorn.suse.cz> References: <20200322201551.E11BAE0FD3@unicorn.suse.cz> <20200322134356.55f7d9b8@kicinski-fedora-PC1C0HJN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200322134356.55f7d9b8@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 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? Michal > > Reported-by: Andrew Lunn > > Signed-off-by: Michal Kubecek > > Reviewed-by: Jakub Kicinski