<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/rtlwifi, branch v4.14</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: r8822be: fix null pointer dereferences with a null driver_adapter</title>
<updated>2017-09-18T10:25:31+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-09-08T13:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e1bf28868ab0bfd1fc73dd8d5e642d88456c30e9'/>
<id>e1bf28868ab0bfd1fc73dd8d5e642d88456c30e9</id>
<content type='text'>
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on a null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter-&gt;driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

I should have spotted these with an earlier patch I sent, but I overlooked
these in the rather large CoverityScan logs.

Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565,
CID#1454591, CID#1454598 ("Explicit null dereferenced")

Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on a null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter-&gt;driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

I should have spotted these with an earlier patch I sent, but I overlooked
these in the rather large CoverityScan logs.

Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565,
CID#1454591, CID#1454598 ("Explicit null dereferenced")

Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: Simplify deinit_priv()</title>
<updated>2017-08-31T16:29:33+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2017-08-30T19:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a470ad21f980c1b642bf17eeda8e584b5566b701'/>
<id>a470ad21f980c1b642bf17eeda8e584b5566b701</id>
<content type='text'>
Now that the extraneous debugging code is removed, routine deinit_priv()
clearly contains code that serves no useful purpose.

A null test before a call to kfree() and a spurious cast are also removed.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the extraneous debugging code is removed, routine deinit_priv()
clearly contains code that serves no useful purpose.

A null test before a call to kfree() and a spurious cast are also removed.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: Remove some dead code</title>
<updated>2017-08-31T16:29:33+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2017-08-30T19:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c353af8343c37386161167ae7fbe6747f6be580c'/>
<id>c353af8343c37386161167ae7fbe6747f6be580c</id>
<content type='text'>
The code found inside an #ifdef CONFIG_RTL_DEBUG ... #endif section
is left over from debugging of the original driver, and should be
deleted.

Reported by: Andreas Ziegler &lt;andreas.ziegler@fau.de&gt;
Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code found inside an #ifdef CONFIG_RTL_DEBUG ... #endif section
is left over from debugging of the original driver, and should be
deleted.

Reported by: Andreas Ziegler &lt;andreas.ziegler@fau.de&gt;
Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: rtlwifi: remove memset before memcpy</title>
<updated>2017-08-29T06:24:03+00:00</updated>
<author>
<name>Himanshu Jha</name>
<email>himanshujha199640@gmail.com</email>
</author>
<published>2017-08-28T10:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=30207d7b640cd27a814abbc657c911121160dc10'/>
<id>30207d7b640cd27a814abbc657c911121160dc10</id>
<content type='text'>
calling memcpy immediately after memset with the same region of memory
makes memset redundant.

Signed-off-by: Himanshu Jha &lt;himanshujha199640@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
calling memcpy immediately after memset with the same region of memory
makes memset redundant.

Signed-off-by: Himanshu Jha &lt;himanshujha199640@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: remove some dead code</title>
<updated>2017-08-28T08:27:29+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-08-25T08:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8eff21bcc6baa1303241ad4c0c8087de0f5022ae'/>
<id>8eff21bcc6baa1303241ad4c0c8087de0f5022ae</id>
<content type='text'>
"hdr" can't be NULL.  We take skb-&gt;data which is non-NULL and add an
offset to get "hdr".

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"hdr" can't be NULL.  We take skb-&gt;data which is non-NULL and add an
offset to get "hdr".

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: fix null pointer dereference with a null driver_adapter</title>
<updated>2017-08-28T08:27:28+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-08-23T15:07:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1919b0562bfcd383caf87a13c346d65ce6d519aa'/>
<id>1919b0562bfcd383caf87a13c346d65ce6d519aa</id>
<content type='text'>
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on the null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter-&gt;driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

Detected by CoverityScan, CID#1454613 ("Explicit null dereferenced")

Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
pointer deference on the null driver_adapter.  Fix this by assigning
driver_adapter earlier to halmac_adapter-&gt;driver_adapter before the tracing
call so that a non-null driver_adapter is passed instead.

Detected by CoverityScan, CID#1454613 ("Explicit null dereferenced")

Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: fix memory leak of eeprom_map on error exit return</title>
<updated>2017-08-28T08:27:28+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-08-23T14:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2ffabf50bd0038acc0e92fe78915610a7fded182'/>
<id>2ffabf50bd0038acc0e92fe78915610a7fded182</id>
<content type='text'>
A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx
fails. Fix this by kfree'ing it before returning.

Detected by CoverityScan, CID#1454569 ("Resource leak")
Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx
fails. Fix this by kfree'ing it before returning.

Detected by CoverityScan, CID#1454569 ("Resource leak")
Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac sub-driver")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: rtlwifi: Improve debugging by using debugfs</title>
<updated>2017-08-28T08:16:57+00:00</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2017-08-24T21:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b55ade192b51c67db34b0a62c28fe294b2107fb7'/>
<id>b55ade192b51c67db34b0a62c28fe294b2107fb7</id>
<content type='text'>
The changes in this commit are also being sent to the main rtlwifi
drivers in wireless-next; however, these changes will also be useful for
any debugging of r8822be before it gets moved into the main tree.

Use debugfs to dump register and btcoex status, and also write registers
and h2c.

We create topdir in /sys/kernel/debug/rtlwifi/, and use the MAC address
as subdirectory with several entries to dump mac_reg, bb_reg, rf_reg etc.
An example is
    /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0

This change permits examination of device registers in a dynamic manner,
a feature not available with the current debug mechanism.

We use seq_file to replace RT_TRACE to dump status, then we can use 'cat'
to access btcoex's status through debugfs.
(i.e. /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/btcoex)
Other related changes are
1. implement btc_disp_dbg_msg() to access btcoex's common status.
2. remove obsolete field bt_exist

Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changes in this commit are also being sent to the main rtlwifi
drivers in wireless-next; however, these changes will also be useful for
any debugging of r8822be before it gets moved into the main tree.

Use debugfs to dump register and btcoex status, and also write registers
and h2c.

We create topdir in /sys/kernel/debug/rtlwifi/, and use the MAC address
as subdirectory with several entries to dump mac_reg, bb_reg, rf_reg etc.
An example is
    /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/mac_0

This change permits examination of device registers in a dynamic manner,
a feature not available with the current debug mechanism.

We use seq_file to replace RT_TRACE to dump status, then we can use 'cat'
to access btcoex's status through debugfs.
(i.e. /sys/kernel/debug/rtlwifi/00-11-22-33-44-55-66/btcoex)
Other related changes are
1. implement btc_disp_dbg_msg() to access btcoex's common status.
2. remove obsolete field bt_exist

Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Cc: Yan-Hsuan Chuang &lt;yhchuang@realtek.com&gt;
Cc: Birming Chiu &lt;birming@realtek.com&gt;
Cc: Shaofu &lt;shaofu@realtek.com&gt;
Cc: Steven Ting &lt;steventing@realtek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: rtlwifi: check for array overflow</title>
<updated>2017-08-28T08:16:57+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-08-24T10:08:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dc33bd4309d2e51950904e8d8f1d333a429c3371'/>
<id>dc33bd4309d2e51950904e8d8f1d333a429c3371</id>
<content type='text'>
Smatch is distrustful of the "capab" value and marks it as user
controlled.  I think it actually comes from the firmware?  Anyway, I
looked at other drivers and they added a bounds check and it seems like
a harmless thing to have so I have added it here as well.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smatch is distrustful of the "capab" value and marks it as user
controlled.  I think it actually comes from the firmware?  Anyway, I
looked at other drivers and they added a bounds check and it seems like
a harmless thing to have so I have added it here as well.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: r8822be: remove unnecessary call to memset</title>
<updated>2017-08-27T17:59:10+00:00</updated>
<author>
<name>Himanshu Jha</name>
<email>himanshujha199640@gmail.com</email>
</author>
<published>2017-08-27T13:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3687994a032115e6e4f89c5715304f5361d13cfb'/>
<id>3687994a032115e6e4f89c5715304f5361d13cfb</id>
<content type='text'>
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Build and tested it.

Signed-off-by: Himanshu Jha &lt;himanshujha199640@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Build and tested it.

Signed-off-by: Himanshu Jha &lt;himanshujha199640@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
