From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joe Perches <joe@perches.com>, Jiri Slaby <jslaby@suse.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: jsm_tty: Fix a possible null pointer dereference in two functions
Date: Wed, 6 Dec 2017 14:16:21 -0200 [thread overview]
Message-ID: <8ae240fa-7f77-8f4c-225c-853cdda73a67@linux.vnet.ibm.com> (raw)
In-Reply-To: <089a4b85-64e8-cb4a-c5f8-9abb2556e5e5@users.sourceforge.net>
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
next prev parent reply other threads:[~2017-12-06 16:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 16:40 [PATCH] jsm_tty: Fix a possible null pointer dereference in two functions SF Markus Elfring
2017-11-29 17:23 ` Joe Perches
2017-11-29 17:35 ` Greg Kroah-Hartman
2017-11-29 17:51 ` Joe Perches
2017-11-29 18:05 ` Greg Kroah-Hartman
2017-11-29 18:16 ` Joe Perches
2017-11-29 18:19 ` SF Markus Elfring
2017-11-30 6:41 ` Jiri Slaby
2017-12-06 16:16 ` Guilherme G. Piccoli [this message]
2017-12-16 6:27 ` jsm_tty: Deletion of a null pointer check in two functions? SF Markus Elfring
2017-12-18 14:36 ` Guilherme G. Piccoli
2017-12-18 17:14 ` SF Markus Elfring
2017-11-29 19:16 ` [PATCH] jsm_tty: Fix a possible null pointer dereference in two functions Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ae240fa-7f77-8f4c-225c-853cdda73a67@linux.vnet.ibm.com \
--to=gpiccoli@linux.vnet.ibm.com \
--cc=elfring@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=jslaby@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).