From: Kalle Valo <kvalo@codeaurora.org>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, Ping-Ke Shih <pkshih@realtek.com>,
"David S. Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: rtlwifi: fix a potential NULL pointer dereference
Date: Sat, 23 Mar 2019 08:40:07 +0200 [thread overview]
Message-ID: <87mulmm6uw.fsf@codeaurora.org> (raw)
In-Reply-To: <AFBB09F8-46AE-4B74-BF53-1045814476B0@umn.edu> (Kangjie Lu's message of "Fri, 22 Mar 2019 22:59:53 -0500")
Kangjie Lu <kjlu@umn.edu> writes:
>> On Mar 12, 2019, at 2:56 AM, Kangjie Lu <kjlu@umn.edu> wrote:
>>
>> In case alloc_workqueue fails, the fix reports the error and
>> returns to avoid NULL pointer dereference.
>>
>> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
>> ---
>> drivers/net/wireless/realtek/rtlwifi/base.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c
>> b/drivers/net/wireless/realtek/rtlwifi/base.c
>> index 217d2a7a43c7..ac746c322554 100644
>> --- a/drivers/net/wireless/realtek/rtlwifi/base.c
>> +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
>> @@ -448,6 +448,11 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
>> /* <2> work queue */
>> rtlpriv->works.hw = hw;
>> rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
>> + if (unlikely(!rtlpriv->works.rtl_wq)) {
>> + pr_err("Failed to allocate work queue\n");
>> + return;
>> + }
>> +
>
> Can someone review the patch?
wireless-drivers-next is not yet open due to the wireless workshop. Also
you can check the patch status yourself:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#checking_state_of_patches_from_patchwork
--
Kalle Valo
next prev parent reply other threads:[~2019-03-23 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 7:56 [PATCH] net: rtlwifi: fix a potential NULL pointer dereference Kangjie Lu
2019-03-23 3:59 ` Kangjie Lu
2019-03-23 6:40 ` Kalle Valo [this message]
2019-04-04 10:25 ` [PATCH] " 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=87mulmm6uw.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=davem@davemloft.net \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=pkshih@realtek.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.