From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, "David S. Miller" <davem@davemloft.net>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: fm10k: fix a potential NULL pointer dereference
Date: Tue, 26 Mar 2019 15:21:41 -0700 [thread overview]
Message-ID: <5bf2a409fb5f3fbb44ac3eda591ba0cbc6122d44.camel@intel.com> (raw)
In-Reply-To: <FA2DD268-9578-49B5-8E9E-D3FA8C9AEDFC@umn.edu>
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On Fri, 2019-03-22 at 22:26 -0500, Kangjie Lu wrote:
> > On Mar 11, 2019, at 1:17 AM, Kangjie Lu <kjlu@umn.edu> wrote:
> >
> > In case alloc_workqueue fails, the fix returns -ENOMEM to avoid
> > potential NULL pointer dereference.
> >
> > Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> > ---
> > drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> > b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> > index 5a0419421511..215f232674f1 100644
> > --- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> > +++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
> > @@ -41,6 +41,8 @@ static int __init fm10k_init_module(void)
> > /* create driver workqueue */
> > fm10k_workqueue = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0,
> > fm10k_driver_name);
> > + if (unlikely(!fm10k_workqueue))
> > + return -ENOMEM;
> >
>
> Jeff, can you review this patch?
Yep, sorry for the delay in getting back to you. I already had this
change in my tree queued up from Yue Haibing. I am actually preparing
to push this fix and few others to Dave in a couple of hours.
>
> > fm10k_dbg_init();
> >
> > --
> > 2.17.1
> >
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2019-03-26 22:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 6:17 [PATCH] net: fm10k: fix a potential NULL pointer dereference Kangjie Lu
2019-03-11 20:38 ` David Miller
2019-03-23 3:26 ` Kangjie Lu
2019-03-26 22:21 ` Jeff Kirsher [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=5bf2a409fb5f3fbb44ac3eda591ba0cbc6122d44.camel@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
/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