Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp113753ybm; Mon, 20 May 2019 12:55:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsQIh5vpbJahur0p2JosVkvXJid792Za1TiTA9AgMQ75yHaDGdBNWjrejVDcWH1IkLfQ7B X-Received: by 2002:aa7:99c7:: with SMTP id v7mr82936098pfi.103.1558382102486; Mon, 20 May 2019 12:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558382102; cv=none; d=google.com; s=arc-20160816; b=oIsiVtmCqAOywN83Z940qOLv5SSiGQMH1i5v3LP/8mDsz69yVHb0+r00hRI2hFrvnZ 76NE1IFTA8sLivG9S2YnkrQpyZWDpiLyWhLc5tRJ2tkAqlX3P9+/BQKvJ4ySBxN6kick h8dcvikU5vJ3ZHoxAyBun7AyALZi4a0y9l8bdcJjgs/y1fUlzisC0Yudx+acQGhWebcx rV8KKhBdmEUaD1IpaGjMaF/dnDDJFbjFPXiXxYnp3uq8PwYYkYo+NYeBHvnHt1aAzEhz GRds0wZbZhwRHVQ04+PhIqgjDqbC537te5HNKfrUyd9zQPX0T+M3VV3EQKAHLXHLxCTM Pjpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=4uwkxCIuN7h5MuoJrGQK3HGn/cHftarjLDT/QRw31gI=; b=WvffHdxWqOy+47HdZqsY7v33VfC2Yco9Y9Gnyla9EFHj2u6e/BM5OoOlFnMuhSpaS7 qKkmSkBSb1cuOWEIeKDaC8vyHNjzSNJSJdc/+OS8uFXJenrm+VP1ZWSgKF7UKXldcGPg N1k9v3TkumoYQq0dzTeF3cQhB7oatSNMjn5H3P2DAGl0Mivaw8awBwl4yrHx5KXV/2jZ sc2or/rKmaQbqy8k3LkF6HMpOrQbRQuvz5OIYW9dGZsN0XeGezJsxLu3L5mptIsXwQBy q5BCxggc8JuU10HxXJ6+0mX4jkUyosdVc7HB0i9KtkQmdVzdu4Fe0edXwWVU7HbYRFnx zlYA== 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 k1si17688761pll.317.2019.05.20.12.54.46; Mon, 20 May 2019 12:55:02 -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 S1726074AbfETTxo (ORCPT + 99 others); Mon, 20 May 2019 15:53:44 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:20880 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfETTxn (ORCPT ); Mon, 20 May 2019 15:53:43 -0400 X-IronPort-AV: E=Sophos;i="5.60,492,1549926000"; d="scan'208";a="306653735" Received: from abo-218-110-68.mrs.modulonet.fr (HELO hadrien) ([85.68.110.218]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2019 21:53:41 +0200 Date: Mon, 20 May 2019 21:53:40 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sasha Levin cc: Pavel Machek , wen.yang99@zte.com.cn, Markus.Elfring@web.de, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Gilles Muller , yamada.masahiro@socionext.com, michal.lkml@markovi.net, nicolas.palix@imag.fr Subject: Re: Coccinelle: semantic patch for missing of_node_put In-Reply-To: <20190520172041.GH11972@sasha-vm> Message-ID: References: <201905171432571474636@zte.com.cn> <20190520093303.GA9320@atrey.karlin.mff.cuni.cz> <20190520172041.GH11972@sasha-vm> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 May 2019, Sasha Levin wrote: > On Mon, May 20, 2019 at 11:52:37AM +0200, Julia Lawall wrote: > > > > > > On Mon, 20 May 2019, Pavel Machek wrote: > > > > > Hi! > > > > > > > A semantic patch has no access to comments. The only thing I can see to > > > > do is to use python to interact with some external tools. For example, > > > > you could write some code to collect the comments in a file and the > > > lines > > > > on which they occur, and then get the comment that most closely precedes > > > > the start of the function. > > > > > > How dangerous is missing of_node_put? AFAICT it will only result into > > > very small, one-time memory leak, right? > > > > > > Could we make sure these patches are _not_ going to stable? Leaking > > > few bytes once per boot is not really a serious bug. > > > > Sasha, > > > > Probably patches that add only of_node_put should not be auto selected for > > stable. > > I can filter them out, but those are fixes, right? Why are we concerned > about them making it into -stable? One of them may have introduced a crash. If there is a bad reference count manipulation elsewhere, then fixing one could cause a later incorrect one to make a double free. On the other hand, I don't know if the one that seemed to cause a crash really caused a crash. It was detected by syzkaller, and it is also possible that git bisect ended up at the wrong place. In any case, forgetting an of_node_put will normally just waste a little memory, so probably stable kernels don't care. julia