From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ganapathi Bhat <gbhat@marvell.com>
Cc: Colin King <colin.king@canonical.com>,
Amitkumar Karwar <amitkarwar@gmail.com>,
Nishant Sarmukadam <nishants@marvell.com>,
Xinming Hu <huxinming820@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy
Date: Sat, 01 Jun 2019 21:08:58 +0000 [thread overview]
Message-ID: <20190601210858.GG31203@kadam> (raw)
In-Reply-To: <MN2PR18MB2637DAA4852542EDA2BBC01DA01A0@MN2PR18MB2637.namprd18.prod.outlook.com>
On Sat, Jun 01, 2019 at 05:29:26PM +0000, Ganapathi Bhat wrote:
> Hi Dan,
>
> > > if (is_multicast_ether_addr(ra)) {
> > > skb_uap = skb_copy(skb, GFP_ATOMIC);
> > > + if (!skb_uap)
> > > + return -ENOMEM;
> >
> > I think we would want to free dev_kfree_skb_any(skb) before returning.
> I think if the pointer is NULL, no need to free it;
You're misreading skb vs skb_uap. "skb_uap" is NULL but "skb" is
non-NULL and I'm pretty sure we should free it.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ganapathi Bhat <gbhat@marvell.com>
Cc: Colin King <colin.king@canonical.com>,
Amitkumar Karwar <amitkarwar@gmail.com>,
Nishant Sarmukadam <nishants@marvell.com>,
Xinming Hu <huxinming820@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy
Date: Sun, 2 Jun 2019 00:08:58 +0300 [thread overview]
Message-ID: <20190601210858.GG31203@kadam> (raw)
In-Reply-To: <MN2PR18MB2637DAA4852542EDA2BBC01DA01A0@MN2PR18MB2637.namprd18.prod.outlook.com>
On Sat, Jun 01, 2019 at 05:29:26PM +0000, Ganapathi Bhat wrote:
> Hi Dan,
>
> > > if (is_multicast_ether_addr(ra)) {
> > > skb_uap = skb_copy(skb, GFP_ATOMIC);
> > > + if (!skb_uap)
> > > + return -ENOMEM;
> >
> > I think we would want to free dev_kfree_skb_any(skb) before returning.
> I think if the pointer is NULL, no need to free it;
You're misreading skb vs skb_uap. "skb_uap" is NULL but "skb" is
non-NULL and I'm pretty sure we should free it.
regards,
dan carpenter
next prev parent reply other threads:[~2019-06-01 21:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-13 16:14 [PATCH] mwifiex: check for null return from skb_copy Colin King
2019-04-13 16:14 ` Colin King
2019-04-13 19:27 ` Dan Carpenter
2019-04-13 19:27 ` Dan Carpenter
2019-06-01 17:29 ` [EXT] " Ganapathi Bhat
2019-06-01 17:29 ` Ganapathi Bhat
2019-06-01 21:08 ` Dan Carpenter [this message]
2019-06-01 21:08 ` Dan Carpenter
2019-06-02 1:56 ` Ganapathi Bhat
2019-06-02 1:56 ` Ganapathi Bhat
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=20190601210858.GG31203@kadam \
--to=dan.carpenter@oracle.com \
--cc=amitkarwar@gmail.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=gbhat@marvell.com \
--cc=huxinming820@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.