mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "G, GurucharanX" <gurucharanx.g@intel.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>,
	"jiri@resnulli.us" <jiri@resnulli.us>
Cc: "leon@kernel.org" <leon@kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [Intel-wired-lan] [PATCH net v4] ice: Add check for kzalloc
Date: Thu, 5 Jan 2023 05:52:13 +0000	[thread overview]
Message-ID: <BYAPR11MB3367038BA3776DF1C17D1B97FCFA9@BYAPR11MB3367.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221208133552.21915-1-jiasheng@iscas.ac.cn>



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jiasheng Jiang
> Sent: Thursday, December 8, 2022 7:06 PM
> To: jiri@resnulli.us
> Cc: leon@kernel.org; intel-wired-lan@lists.osuosl.org; Jiasheng Jiang
> <jiasheng@iscas.ac.cn>; Brandeburg, Jesse <jesse.brandeburg@intel.com>;
> linux-kernel@vger.kernel.org; edumazet@google.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; netdev@vger.kernel.org; kuba@kernel.org;
> pabeni@redhat.com; davem@davemloft.net
> Subject: [Intel-wired-lan] [PATCH net v4] ice: Add check for kzalloc
> 
> 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>
> ---
> Changelog:
> 
> v3 -> v4:
> 
> 1. Move the check right after the kzalloc.
> 
> v2 -> v3:
> 
> 1. Use "while (i--)" to simplify the code.
> 
> v1 -> v2:
> 
> 1. Use goto-label to share the clean code.
> ---
>  drivers/net/ethernet/intel/ice/ice_gnss.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)

      parent reply	other threads:[~2023-01-05  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 13:35 Jiasheng Jiang
2022-12-08 16:02 ` Jiri Pirko
2023-01-05  5:52 ` G, GurucharanX [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=BYAPR11MB3367038BA3776DF1C17D1B97FCFA9@BYAPR11MB3367.namprd11.prod.outlook.com \
    --to=gurucharanx.g@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jiasheng@iscas.ac.cn \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®