Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3024053ybb; Sun, 22 Mar 2020 13:24:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtVlgFT4Uzo39IQ5vXKH6YZZo2iR9yyJEGOHBhI6q/LuGaCT4Xf6GMZthOiGo2gPSCip7yg X-Received: by 2002:a9d:1d07:: with SMTP id m7mr14684071otm.167.1584908687570; Sun, 22 Mar 2020 13:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584908687; cv=none; d=google.com; s=arc-20160816; b=YhH9zNU5wNnEN7Zm2tNP8gQ9SEdyhYOAxVWS3GSFqBeeCyiIymhIKXUZ5xp/0fJK8p i8S2cAp7GUyowY6Ls4DC4YjhhZ5hKX21hNDVP1h00rpKq/lNYOVEvt3C0rrMipXpvE+Z TTZe6xKy+pa+/Q/aVpt2tHwSRyOV3KfEakA+UHxQsXmT7d3cyL2p7sT5Aa8xIEri5Gc7 QSyHux3EDyQhpfxvoBjQxug4Sm0XeOsYYIni84tEHLrtg2PDKTId6vxFGXz9WdDg5A5N fyY6iFULswWohKs07BpKu5TOn86VdhsiOtNPF4N0na59rLE8tSUAVjEsGPg87EDLXlUy mXKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Y1E2ofj9UBjZicuoiVM7MKb+d/EIWm4bm2+rPrDxTzU=; b=0ZR2JnvK38ss7G04SQvl1RrW9vw+ItMQNAL0YRpn0OIKsY8Cj3fLkvPziqdUrIOjRL YBYDJxMcj4yPBZV1dkCSUE+tEVjhjcnBgD6W58oohWcIAQdv3gBOFwJYMkXMhPjQ0gSh EKGzkufG3j2W/hjA7f4bnNMy08xm/VS0BPmMca0pW864ePRhZDjyreHoZAb+3GP0oZjN mjw/ujzAAlBabS6sM9IPR3HyUktp5qiLIlVHAmIomDh3B9i1ubZwbZGG2p+ofMJvvGLM roio+L0n2oM7MAxLrHLS8ZgbnjaBlxEVIs/LiZtWV7YXm+j5WNCTEj4scphNBco/3osb 7fyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=OSXrgMzm; 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 u207si6291530oia.176.2020.03.22.13.24.34; Sun, 22 Mar 2020 13:24:47 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=OSXrgMzm; 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 S1726857AbgCVUX4 (ORCPT + 99 others); Sun, 22 Mar 2020 16:23:56 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50746 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbgCVUX4 (ORCPT ); Sun, 22 Mar 2020 16:23:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Y1E2ofj9UBjZicuoiVM7MKb+d/EIWm4bm2+rPrDxTzU=; b=OSXrgMzmOHr93LXcev85S0IwsI sewIA7jqbhLXVxGmor+kNr4u3ul2kB+KAsEXH4EQwH0fjC712N/N6HCoLWrTf0n+MmVnxCuGrM5r0 D+zfZifwP1gpWsaLyV7+0Hh+YVGEu43URgCdfFjOzzFDVo/EVUj03pp+n5GqzGfvY0J0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jG78R-0002L5-Rz; Sun, 22 Mar 2020 21:23:51 +0100 Date: Sun, 22 Mar 2020 21:23:51 +0100 From: Andrew Lunn To: Michal Kubecek Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ethtool: fix reference leak in some *_SET handlers Message-ID: <20200322202351.GE3819@lunn.ch> References: <20200322201551.E11BAE0FD3@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200322201551.E11BAE0FD3@unicorn.suse.cz> 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 09:15:51PM +0100, 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. > > Reported-by: Andrew Lunn > Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Andrew