<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/wireless/realtek, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-27T07:46:12Z</updated>
<entry>
<title>rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts enabled</title>
<updated>2022-01-27T07:46:12Z</updated>
<author>
<name>Larry Finger</name>
</author>
<published>2021-12-15T17:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d7059bf821919942046bb291924095abe048f7c'/>
<id>urn:sha1:0d7059bf821919942046bb291924095abe048f7c</id>
<content type='text'>
commit 8b144dedb928e4e2f433a328d58f44c3c098d63e upstream.

Syzbot reports the following WARNING:

[200~raw_local_irq_restore() called with IRQs enabled
WARNING: CPU: 1 PID: 1206 at kernel/locking/irqflag-debug.c:10
   warn_bogus_irq_restore+0x1d/0x20 kernel/locking/irqflag-debug.c:10

Hardware initialization for the rtl8188cu can run for as long as 350 ms,
and the routine may be called with interrupts disabled. To avoid locking
the machine for this long, the current routine saves the interrupt flags
and enables local interrupts. The problem is that it restores the flags
at the end without disabling local interrupts first.

This patch fixes commit a53268be0cb9 ("rtlwifi: rtl8192cu: Fix too long
disable of IRQs").

Reported-by: syzbot+cce1ee31614c171f5595@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Fixes: a53268be0cb9 ("rtlwifi: rtl8192cu: Fix too long disable of IRQs")
Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20211215171105.20623-1-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: rtlwifi: properly check for alloc_workqueue() failure</title>
<updated>2021-05-26T09:27:33Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-05-03T11:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=812650c66221d56ed333396ee0acbd55e80e47f1'/>
<id>urn:sha1:812650c66221d56ed333396ee0acbd55e80e47f1</id>
<content type='text'>
commit 30b0e0ee9d02b97b68705c46b41444786effc40c upstream.

If alloc_workqueue() fails, properly catch this and propagate the error
to the calling functions, so that the devuce initialization will
properly error out.

Cc: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Cc: Bryan Brattlof &lt;hello@bryanbrattlof.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210503115736.2104747-14-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "rtlwifi: fix a potential NULL pointer dereference"</title>
<updated>2021-05-26T09:27:33Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-05-03T11:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0718ad225d755a442c22d656042784bfa21e4d2c'/>
<id>urn:sha1:0718ad225d755a442c22d656042784bfa21e4d2c</id>
<content type='text'>
commit 68c5634c4a7278672a3bed00eb5646884257c413 upstream.

This reverts commit 765976285a8c8db3f0eb7f033829a899d0c2786e.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted.  It will be fixed up "correctly" in a
later kernel change.

This commit is not correct, it should not have used unlikely() and is
not propagating the error properly to the calling function, so it should
be reverted at this point in time.  Also, if the check failed, the
work queue was still assumed to be allocated, so further accesses would
have continued to fail, meaning this patch does nothing to solve the
root issues at all.

Cc: Kangjie Lu &lt;kjlu@umn.edu&gt;
Cc: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Cc: Bryan Brattlof &lt;hello@bryanbrattlof.com&gt;
Fixes: 765976285a8c ("rtlwifi: fix a potential NULL pointer dereference")
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20210503115736.2104747-13-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtl8xxxu: prevent potential memory leak</title>
<updated>2020-10-29T08:03:10Z</updated>
<author>
<name>Chris Chiu</name>
</author>
<published>2020-09-06T04:04:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8270abd5a593ca05b161dad0bacb436807a6528'/>
<id>urn:sha1:a8270abd5a593ca05b161dad0bacb436807a6528</id>
<content type='text'>
[ Upstream commit 86279456a4d47782398d3cb8193f78f672e36cac ]

Free the skb if usb_submit_urb fails on rx_urb. And free the urb
no matter usb_submit_urb succeeds or not in rtl8xxxu_submit_int_urb.

Signed-off-by: Chris Chiu &lt;chiu@endlessm.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200906040424.22022-1-chiu@endlessm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtlwifi: rtl8192cu: Prevent leaking urb</title>
<updated>2020-09-03T09:19:24Z</updated>
<author>
<name>Reto Schneider</name>
</author>
<published>2020-06-22T13:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab75ab9165de8fb8d037454856afb165e8d8b06d'/>
<id>urn:sha1:ab75ab9165de8fb8d037454856afb165e8d8b06d</id>
<content type='text'>
[ Upstream commit 03128643eb5453a798db5770952c73dc64fcaf00 ]

If usb_submit_urb fails the allocated urb should be unanchored and
released.

Signed-off-by: Reto Schneider &lt;code@reto-schneider.ch&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200622132113.14508-3-code@reto-schneider.ch
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtlwifi: rtl_pci: Fix -Wcast-function-type</title>
<updated>2020-02-28T14:38:59Z</updated>
<author>
<name>Phong Tran</name>
</author>
<published>2019-11-26T17:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=852133b4952599c256cdc5e0d2c6c33f209dc320'/>
<id>urn:sha1:852133b4952599c256cdc5e0d2c6c33f209dc320</id>
<content type='text'>
[ Upstream commit cb775c88da5d48a85d99d95219f637b6fad2e0e9 ]

correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20

Signed-off-by: Phong Tran &lt;tranmanphong@gmail.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtl8xxxu: fix interface sanity check</title>
<updated>2020-02-05T13:03:34Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2019-12-10T11:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc62a25dba105e4636b9bafcd1a1f836960ee659'/>
<id>urn:sha1:cc62a25dba105e4636b9bafcd1a1f836960ee659</id>
<content type='text'>
commit 39a4281c312f2d226c710bc656ce380c621a2b16 upstream.

Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.4
Cc: Jes Sorensen &lt;Jes.Sorensen@redhat.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtlwifi: Remove unnecessary NULL check in rtl_regd_init</title>
<updated>2020-01-23T07:18:37Z</updated>
<author>
<name>Nathan Chancellor</name>
</author>
<published>2019-10-23T00:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4915aa3b3bb976996624c6ffa81da8e5a705c7d2'/>
<id>urn:sha1:4915aa3b3bb976996624c6ffa81da8e5a705c7d2</id>
<content type='text'>
commit 091c6e9c083f7ebaff00b37ad13562d51464d175 upstream.

When building with Clang + -Wtautological-pointer-compare:

drivers/net/wireless/realtek/rtlwifi/regd.c:389:33: warning: comparison
of address of 'rtlpriv-&gt;regd' equal to a null pointer is always false
[-Wtautological-pointer-compare]
        if (wiphy == NULL || &amp;rtlpriv-&gt;regd == NULL)
                              ~~~~~~~~~^~~~    ~~~~
1 warning generated.

The address of an array member is never NULL unless it is the first
struct member so remove the unnecessary check. This was addressed in
the staging version of the driver in commit f986978b32b3 ("Staging:
rtlwifi: remove unnecessary NULL check").

While we are here, fix the following checkpatch warning:

CHECK: Comparison to NULL could be written "!wiphy"
35: FILE: drivers/net/wireless/realtek/rtlwifi/regd.c:389:
+       if (wiphy == NULL)

Fixes: 0c8173385e54 ("rtl8192ce: Add new driver")
Link:https://github.com/ClangBuiltLinux/linux/issues/750
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtl8xxxu: prevent leaking urb</title>
<updated>2020-01-14T19:03:06Z</updated>
<author>
<name>Navid Emamdoost</name>
</author>
<published>2019-09-20T03:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57d09152eef9e1afca04b2f7bebccd07e0efa881'/>
<id>urn:sha1:57d09152eef9e1afca04b2f7bebccd07e0efa881</id>
<content type='text'>
commit a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c upstream.

In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Reviewed-by: Chris Chiu &lt;chiu@endlessm.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Cc: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()</title>
<updated>2020-01-04T12:34:14Z</updated>
<author>
<name>Ping-Ke Shih</name>
</author>
<published>2019-11-05T02:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d095e83679791119d03a30e6b511600f123b87b0'/>
<id>urn:sha1:d095e83679791119d03a30e6b511600f123b87b0</id>
<content type='text'>
[ Upstream commit 5174f1e41074b5186608badc2e89441d021e8c08 ]

This leak was found by testing the EDIMAX EW-7612 on Raspberry Pi 3B+ with
Linux 5.4-rc5 (multi_v7_defconfig + rtlwifi + kmemleak) and noticed a
single memory leak during probe:

unreferenced object 0xec13ee40 (size 176):
  comm "kworker/u8:1", pid 36, jiffies 4294939321 (age 5580.790s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;fc1bbb3e&gt;] __netdev_alloc_skb+0x9c/0x164
    [&lt;863dfa6e&gt;] rtl92c_set_fw_rsvdpagepkt+0x254/0x340 [rtl8192c_common]
    [&lt;9572be0d&gt;] rtl92cu_set_hw_reg+0xf48/0xfa4 [rtl8192cu]
    [&lt;116df4d8&gt;] rtl_op_bss_info_changed+0x234/0x96c [rtlwifi]
    [&lt;8933575f&gt;] ieee80211_bss_info_change_notify+0xb8/0x264 [mac80211]
    [&lt;d4061e86&gt;] ieee80211_assoc_success+0x934/0x1798 [mac80211]
    [&lt;e55adb56&gt;] ieee80211_rx_mgmt_assoc_resp+0x174/0x314 [mac80211]
    [&lt;5974629e&gt;] ieee80211_sta_rx_queued_mgmt+0x3f4/0x7f0 [mac80211]
    [&lt;d91091c6&gt;] ieee80211_iface_work+0x208/0x318 [mac80211]
    [&lt;ac5fcae4&gt;] process_one_work+0x22c/0x564
    [&lt;f5e6d3b6&gt;] worker_thread+0x44/0x5d8
    [&lt;82c7b073&gt;] kthread+0x150/0x154
    [&lt;b43e1b7d&gt;] ret_from_fork+0x14/0x2c
    [&lt;794dff30&gt;] 0x0

It is because 8192cu doesn't implement usb_cmd_send_packet(), and this
patch just frees the skb within the function to resolve memleak problem
by now. Since 8192cu doesn't turn on fwctrl_lps that needs to download
command packet for firmware via the function, applying this patch doesn't
affect driver behavior.

Reported-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
