public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ren Mingshuai <renmingshuai@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	jirislaby@kernel.org, caowangbao@huawei.com, yanan@huawei.com,
	liaichun@huawei.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: hso: Fix potential null pointer dereference
Date: Wed, 1 Nov 2023 15:20:05 +0100	[thread overview]
Message-ID: <2023110139-spearmint-throttle-ed90@gregkh> (raw)
In-Reply-To: <20231101133544.246961-1-renmingshuai@huawei.com>

On Wed, Nov 01, 2023 at 09:35:44PM +0800, Ren Mingshuai wrote:
> Generally, the old always points to the address of a ktermios structure,
> so old is unlikely to be NULL. Still check it before dereference as
> elsewhere.

If it can not happen, there is no need to check it.  So unless you can
prove that this ever could happen, this change isn't needed, right?

thanks,

greg k-h

  reply	other threads:[~2023-11-01 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 13:35 [PATCH] tty: hso: Fix potential null pointer dereference Ren Mingshuai
2023-11-01 14:20 ` Greg KH [this message]
2023-11-02  2:09   ` Ren Mingshuai

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=2023110139-spearmint-throttle-ed90@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=caowangbao@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jirislaby@kernel.org \
    --cc=kuba@kernel.org \
    --cc=liaichun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=renmingshuai@huawei.com \
    --cc=yanan@huawei.com \
    /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