From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: henry <caihe@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Nirranjan Kirubaharan <nirranjan@chelsio.com>,
"wangyunjian@huawei.com" <wangyunjian@huawei.com>,
"zhoujingbin@huawei.com" <zhoujingbin@huawei.com>,
Kumar Sanghvi <kumaras@chelsio.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/cxgbe: fix a bug in t4_wr_mbox_meat_timeout
Date: Thu, 30 Mar 2017 16:58:36 +0530 [thread overview]
Message-ID: <20170330112835.GA4937@chelsio.com> (raw)
In-Reply-To: <1490686340-9340-1-git-send-email-caihe@huawei.com>
On Tuesday, March 03/28/17, 2017 at 13:02:20 +0530, henry wrote:
> Check return value of malloc
>
> Signed-off-by: henry <caihe@huawei.com>
> ---
> drivers/net/cxgbe/base/t4_hw.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/cxgbe/base/t4_hw.c
> b/drivers/net/cxgbe/base/t4_hw.c
> index c089b06..9dca8da 100644
> --- a/drivers/net/cxgbe/base/t4_hw.c
> +++ b/drivers/net/cxgbe/base/t4_hw.c
> @@ -359,6 +359,9 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int
> mbox,
> struct mbox_entry entry;
> u32 pcie_fw = 0;
>
> + if (!temp)
> + return -ENOMEM;
> +
> if ((size & 15) || size > MBOX_LEN) {
> free(temp);
> return -EINVAL;
> --
> 1.8.3.1
Thanks for the fix!
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
next prev parent reply other threads:[~2017-03-30 11:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 7:32 henry
2017-03-30 11:28 ` Rahul Lakkireddy [this message]
2017-04-07 10:50 ` Ferruh Yigit
2017-03-30 16:08 ` Ferruh Yigit
2017-04-05 11:23 ` Ferruh Yigit
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=20170330112835.GA4937@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=caihe@huawei.com \
--cc=dev@dpdk.org \
--cc=kumaras@chelsio.com \
--cc=nirranjan@chelsio.com \
--cc=wangyunjian@huawei.com \
--cc=zhoujingbin@huawei.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).