From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbdK2SQP (ORCPT ); Wed, 29 Nov 2017 13:16:15 -0500 Received: from smtprelay0119.hostedemail.com ([216.40.44.119]:55187 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751396AbdK2SQL (ORCPT ); Wed, 29 Nov 2017 13:16:11 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2110:2393:2553:2559:2562:2691:2693:2828:2901:2919:3138:3139:3140:3141:3142:3353:3622:3865:3867:3870:3871:3872:3873:3874:4321:5007:7576:7903:8660:9040:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12438:12740:12760:12895:13069:13148:13161:13229:13230:13311:13357:13439:14096:14097:14659:14721:21080:21433:21451:21627,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: waste80_35ab6e0171229 X-Filterd-Recvd-Size: 2380 Message-ID: <1511979367.19952.71.camel@perches.com> Subject: Re: [PATCH] jsm_tty: Fix a possible null pointer dereference in two functions From: Joe Perches To: Greg Kroah-Hartman Cc: SF Markus Elfring , linux-serial@vger.kernel.org, "Guilherme G. Piccoli" , Jiri Slaby , LKML , kernel-janitors@vger.kernel.org Date: Wed, 29 Nov 2017 10:16:07 -0800 In-Reply-To: <20171129180528.GA24705@kroah.com> References: <5c78db97-88f5-8655-9a47-eeee0a043fba@users.sourceforge.net> <1511976187.19952.65.camel@perches.com> <20171129173504.GA20581@kroah.com> <1511977896.19952.69.camel@perches.com> <20171129180528.GA24705@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-11-29 at 18:05 +0000, Greg Kroah-Hartman wrote: > On Wed, Nov 29, 2017 at 09:51:36AM -0800, Joe Perches wrote: > > On Wed, 2017-11-29 at 17:35 +0000, Greg Kroah-Hartman wrote: > > > On Wed, Nov 29, 2017 at 09:23:07AM -0800, Joe Perches wrote: > > > > On Wed, 2017-11-29 at 17:40 +0100, SF Markus Elfring wrote: > > > > > From: Markus Elfring > > > > > Date: Wed, 29 Nov 2017 17:30:36 +0100 > > > > > > > > > > Move two debug messages so that a null pointer access can not happen > > > > > for the variable "ch" in these functions. > > > > > > > > An actual defect fix! > > > > > > Nope, not at all, this does not "fix" anything. > > > > Well, I believe it does in unusual cases like a > > CONFIG_DYNAMIC_DEBUG when this is enabled by an > > odd +p in the dynamic debug control file. > > > > > > Here you could probably cc stable too. > > > > > > Nope, not worth it. > > > > > > > > It's pretty unlikely, but it is an actual defect. > > No it is not, those variables will never be set to NULL, so this can > never be triggered. Walk up the call chain. Right you are. Local analysis isn't enough. The code could/should be removed, but it's not a defect. cheers, Joe