From: Greg KH <gregkh@linuxfoundation.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: mika.westerberg@linux.intel.com, andreas.noever@gmail.com,
michael.jamet@intel.com, YehezkelShB@gmail.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thunderbolt: Check for null pointer after calling kmemdup in icm_handle_event
Date: Wed, 5 Jan 2022 11:21:57 +0100 [thread overview]
Message-ID: <YdVxRewPaS2MqqaO@kroah.com> (raw)
In-Reply-To: <20220105082634.2410596-1-jiasheng@iscas.ac.cn>
On Wed, Jan 05, 2022 at 04:26:34PM +0800, Jiasheng Jiang wrote:
> As the possible failure of the allocation, kmemdup() may return NULL
> pointer.
> Like alloc_switch(), it might be better to check it.
> Therefore, icm_handle_event() should also check the return value of
> kmemdup().
> If fails, just free 'n' and directly return is enough, same as the way
> to handle the failure of kmalloc().
I can not understand this changelog text at all, sorry. Please read the
documentation for how to write a good changelog text.
And most importantly, how did you test this change?
thanks,
greg k-h
prev parent reply other threads:[~2022-01-05 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 8:26 [PATCH] thunderbolt: Check for null pointer after calling kmemdup in icm_handle_event Jiasheng Jiang
2022-01-05 10:17 ` Mika Westerberg
2022-01-05 10:21 ` Greg KH [this message]
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=YdVxRewPaS2MqqaO@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=jiasheng@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).