From: "John W. Linville" <linville@tuxdriver.com>
To: Kiran Divekar <kirandivekar@gmail.com>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: add NULL check on return value of get_zeroed_page
Date: Mon, 24 Aug 2009 16:00:19 -0400 [thread overview]
Message-ID: <20090824200019.GD8998@tuxdriver.com> (raw)
In-Reply-To: <1fe543780908230952v5738f6bck943627d0de6c1383@mail.gmail.com>
On Sun, Aug 23, 2009 at 10:22:22PM +0530, Kiran Divekar wrote:
> From fb132b536facfbdc47a24afe538c50662d16b3ad Mon Sep 17 00:00:00 2001
> From: Kiran Divekar <kirandivekar@gmail.com>
> Date: Sun, 23 Aug 2009 22:05:21 +0530
> Subject: [PATCH] add NULL check on return value of get_zeroed_page
>
> Most of the places in debugfs.c are missing a NULL check on the return value of
> get_zeroed_page API call. Added required NULL check at appropriate places.
>
> Signed-off-by: Kiran Divekar <kirandivekar@gmail.com>
#1 -- Don't post the output of git format-patch directly like this. Use git
send-email instead.
> ---
> drivers/net/wireless/libertas/debugfs.c | 28 ++++++++++++++++++++++++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/debugfs.c
> b/drivers/net/wireless/libertas/debugfs.c
> index 811ffc3..893a55c 100644
> --- a/drivers/net/wireless/libertas/debugfs.c
> +++ b/drivers/net/wireless/libertas/debugfs.c
> @@ -45,6 +45,8 @@ static ssize_t lbs_dev_info(struct file *file, char
> __user *userbuf,
> unsigned long addr = get_zeroed_page(GFP_KERNEL);
> char *buf = (char *)addr;
> ssize_t res;
> + if (!buf)
> + return -ENOMEM;
>
> pos += snprintf(buf+pos, len-pos, "state = %s\n",
> szStates[priv->connect_status]);
#2 -- Don't use an MUA that alters whitespace in the message.
Feel free to repost...
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2009-08-24 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-23 16:52 [PATCH] libertas: add NULL check on return value of get_zeroed_page Kiran Divekar
2009-08-24 20:00 ` John W. Linville [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-08-28 12:17 Kiran Divekar
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=20090824200019.GD8998@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=kirandivekar@gmail.com \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/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).