From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: p54: allocate enough space for ->used_rxkeys
Date: Mon, 22 May 2017 15:31:02 +0000 (UTC) [thread overview]
Message-ID: <20170522153102.20517607A4@smtp.codeaurora.org> (raw)
In-Reply-To: <20170506004835.a5awr4v5rba2pmu5@mwanda>
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We have the number of longs, but we should be calculating the number of
> bytes needed.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/wireless/intersil/p54/fwio.c b/drivers/net/wireless/intersil/p54/fwio.c
> index 4ac6764f4897..3076f646c829 100644
> --- a/drivers/net/wireless/intersil/p54/fwio.c
> +++ b/drivers/net/wireless/intersil/p54/fwio.c
> @@ -176,8 +176,9 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
> * keeping a extra list for uploaded keys.
> */
>
> - priv->used_rxkeys = kzalloc(BITS_TO_LONGS(
> - priv->rx_keycache_size), GFP_KERNEL);
> + priv->used_rxkeys = kcalloc(BITS_TO_LONGS(priv->rx_keycache_size),
> + sizeof(long),
> + GFP_KERNEL);
>
> if (!priv->used_rxkeys)
> return -ENOMEM;
Patch applied to wireless-drivers-next.git, thanks.
c239838fbd6d p54: allocate enough space for ->used_rxkeys
--
https://patchwork.kernel.org/patch/9714501/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2017-05-22 15:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-06 0:48 [PATCH] p54: allocate enough space for ->used_rxkeys Dan Carpenter
2017-05-22 15:31 ` Kalle Valo [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=20170522153102.20517607A4@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=chunkeey@googlemail.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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).