Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932434AbaLAUe7 (ORCPT ); Mon, 1 Dec 2014 15:34:59 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:10499 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932112AbaLAUet (ORCPT ); Mon, 1 Dec 2014 15:34:49 -0500 X-IronPort-AV: E=Sophos;i="5.07,495,1413237600"; d="scan'208";a="110560512" Date: Mon, 1 Dec 2014 21:34:45 +0100 (CET) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Johannes Berg cc: SF Markus Elfring , Lino Sanfilippo , Olof Johansson , netdev@vger.kernel.org, backports@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, "Luis R. Rodriguez" Subject: Re: net-PA Semi: Deletion of unnecessary checks before the function call "pci_dev_put" In-Reply-To: <1417465745.28610.0.camel@sipsolutions.net> Message-ID: References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <547BC5AD.6090500@users.sourceforge.net> (sfid-20141201_023451_153915_6CFB474F) <1417465745.28610.0.camel@sipsolutions.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Dec 2014, Johannes Berg wrote: > On Mon, 2014-12-01 at 02:34 +0100, SF Markus Elfring wrote: > > > > Some of those NULL pointer checks on input parameters may have been > > > added subsequently to functions. So there may be older kernel versions > > > out there in which those checks dont exists in some cases. If some of > > > the now "cleaned up" code is backported to such a kernel chances are > > > good that those missing checks are overseen. And then neither caller nor > > > callee is doing the NULL pointer check. > > > I assume that a few backporters can tell you more about their corresponding > > software development experiences. > > http://www.do-not-panic.com/2014/04/automatic-linux-kernel-backporting-with-coccinelle.html > > In such cases we just provide an appropriate wrapper and replace callers > of the original function by callers of the wrapper, typically with a > #define. > > So this kind of evolution is no problem for the (automated) backports > using the backports project - although it can be difficult to detect > such a thing is needed. That is exactly the problem... julia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/