From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbdLFQQo (ORCPT ); Wed, 6 Dec 2017 11:16:44 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58998 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbdLFQQm (ORCPT ); Wed, 6 Dec 2017 11:16:42 -0500 Subject: Re: jsm_tty: Fix a possible null pointer dereference in two functions To: SF Markus Elfring , linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Joe Perches , Jiri Slaby , LKML , kernel-janitors@vger.kernel.org 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> <089a4b85-64e8-cb4a-c5f8-9abb2556e5e5@users.sourceforge.net> From: "Guilherme G. Piccoli" Date: Wed, 6 Dec 2017 14:16:21 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <089a4b85-64e8-cb4a-c5f8-9abb2556e5e5@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17120616-0056-0000-0000-000003F4A0C6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008160; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000244; SDB=6.00956319; UDB=6.00483406; IPR=6.00736356; BA=6.00005729; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018384; XFM=3.00000015; UTC=2017-12-06 16:16:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120616-0057-0000-0000-0000082BD709 Message-Id: <8ae240fa-7f77-8f4c-225c-853cdda73a67@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-06_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712060234 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/2017 04:19 PM, SF Markus Elfring wrote: >>> 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. > > If the involved software developers are convinced about the validity > of this pointer: > > How do you think about to delete the following condition check > instead in the discussed function implementations? > > if (!ch) > return; > > > Regards, > Markus > Thanks for the fix. I was on vacation - but now seeing all the analysis made here, if "ch" can't be NULL then please go ahead and remove the check =) I observed that this check comes from before Git, so really ancient code... Cheers, Guilherme