netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, Jiasheng Jiang <jiasheng@iscas.ac.cn>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@nvidia.com>,
	Gurucharan G <gurucharanx.g@intel.com>
Subject: Re: [PATCH net 2/2] ice: Add check for kzalloc
Date: Tue, 10 Jan 2023 12:56:41 +0200	[thread overview]
Message-ID: <Y71EaQkwvw2OMVHC@unreal> (raw)
In-Reply-To: <20230109225358.3478060-3-anthony.l.nguyen@intel.com>

On Mon, Jan 09, 2023 at 02:53:58PM -0800, Tony Nguyen wrote:
> From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> 
> Add the check for the return value of kzalloc in order to avoid
> NULL pointer dereference.
> Moreover, use the goto-label to share the clean code.
> 
> Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_gnss.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 22:53 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-01-09 (ice) Tony Nguyen
2023-01-09 22:53 ` [PATCH net 1/2] ice: Fix potential memory leak in ice_gnss_tty_write() Tony Nguyen
2023-01-09 22:53 ` [PATCH net 2/2] ice: Add check for kzalloc Tony Nguyen
2023-01-10 10:56   ` Leon Romanovsky [this message]
2023-01-11  2:26   ` Jakub Kicinski
2023-01-11 19:31     ` Tony Nguyen
2023-01-11 20:01       ` Jakub Kicinski
2023-01-11  2:30 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-01-09 (ice) patchwork-bot+netdevbpf

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=Y71EaQkwvw2OMVHC@unreal \
    --to=leon@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gurucharanx.g@intel.com \
    --cc=jiasheng@iscas.ac.cn \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).