From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Amitkumar Karwar <akarwar@marvell.com>,
Bing Zhao <bzhao@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mwifiex: fix mwifiex_rdeeprom_read()
Date: Tue, 25 Aug 2015 12:29:07 +0000 [thread overview]
Message-ID: <87lhcz5z70.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20150820103037.GA5521@mwanda> (Dan Carpenter's message of "Thu, 20 Aug 2015 13:30:37 +0300")
Dan Carpenter <dan.carpenter@oracle.com> writes:
> There were several bugs here.
>
> 1) The done label was in the wrong place so we didn't copy any
> information out when there was no command given.
>
> 2) We were using PAGE_SIZE as the size of the buffer instead of
> "PAGE_SIZE - pos".
>
> 3) snprintf() returns the number of characters that would have been
> printed if there were enough space. If there was not enough space
> (and we had fixed the memory corruption bug #2) then it would result
> in an information leak when we do simple_read_from_buffer(). I've
> changed it to use scnprintf() instead.
>
> I also removed the initialization at the start of the function, because
> I thought it made the code a little more clear.
>
> Fixes: 5e6e3a92b9a4 ('wireless: mwifiex: initial commit for Marvell mwifiex driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
I see a new warning:
drivers/net/wireless/mwifiex/debugfs.c:760:31: warning: pos may be used uninitialized in this function [-Wuninitialized]
Is it a valid warning or should I apply the patch anyway?
--
Kalle Valo
next prev parent reply other threads:[~2015-08-25 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 10:30 [patch] mwifiex: fix mwifiex_rdeeprom_read() Dan Carpenter
2015-08-25 6:56 ` Amitkumar Karwar
2015-08-25 12:29 ` Kalle Valo [this message]
2015-09-21 16:19 ` [patch v2] " Dan Carpenter
2015-09-22 10:58 ` Amitkumar Karwar
2015-09-29 8:09 ` [v2] " Kalle Valo
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=87lhcz5z70.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=akarwar@marvell.com \
--cc=bzhao@marvell.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@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 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).