05 Dec, 2019
1 commit
-
commit b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 upstream.
The variable skb is released via kfree_skb() when the return value of
_rtl92e_tx is not zero. However, after that, skb is accessed again to
read its length, which may result in a use after free bug. This patch
fixes the bug by moving the release operation to where skb is never
used later.Signed-off-by: Pan Bian
Reviewed-by: Dan Carpenter
Cc: stable
Link: https://lore.kernel.org/r/1572965351-6745-1-git-send-email-bianpan2016@163.com
Signed-off-by: Greg Kroah-Hartman
05 Sep, 2019
1 commit
-
Fix checkpath error "CHECK: Blank lines aren't necessary after an open
brace '{'"
in rtllib.h:482.Signed-off-by: Beatriz Martins de Carvalho
Link: https://lore.kernel.org/r/20190904210326.17983-1-martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman
22 Aug, 2019
2 commits
-
Fixes gcc '-Wunused-but-set-variable' warning:
In function ieee80211_ccmp_encrypt:
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6:
warning: variable data_len set but not used [-Wunused-but-set-variable]It is not used since commit 5ee5265674ce ("staging:
rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)")Reported-by: Hulk Robot
Signed-off-by: YueHaibing
Link: https://lore.kernel.org/r/20190821122802.44028-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman -
Fixes gcc '-Wunused-but-set-variable' warning:
In function '_rtl92e_dm_tx_power_tracking_callback_tssi':
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:621:7:
warning: variable 'bHighpowerstate' set but not used [-Wunused-but-set-variable]
In function '_rtl92e_dm_rx_path_sel_byrssi':
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:1904:32:
warning: variable 'cck_rx_ver2_min_index' set but not used [-Wunused-but-set-variable]They are never used, so can be removed.
Reported-by: Hulk Robot
Signed-off-by: YueHaibing
Link: https://lore.kernel.org/r/20190821122556.37636-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman
18 Aug, 2019
1 commit
-
Use ccm(aes) aead transform instead of invoking the AES block cipher
block by block.Signed-off-by: Christina Quast
Reviewed-by: Ard Biesheuvel
Link: https://lore.kernel.org/r/20190816065936.12214-3-contact@christina-quast.de
Signed-off-by: Greg Kroah-Hartman
05 Aug, 2019
1 commit
-
As kmemdup API does kmalloc + memcpy . We can make use of it instead of
calling kmalloc and memcpy independetly.Signed-off-by: Hariprasad Kelam
Link: https://lore.kernel.org/r/20190804024832.GA14352@hari-Inspiron-1545
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2019
1 commit
-
Added the identifier name in the function prototype definition.
Signed-off-by: Abhinav Jain
Link: https://lore.kernel.org/r/20190726190146.10875-1-ubuntu@ip-172-31-129-142.ec2.internal
Signed-off-by: Greg Kroah-Hartman
25 Jul, 2019
2 commits
-
Everywhere else in the kernel ESSIDs are printed using %pE, and I can't
see why there should be an exception here.Signed-off-by: J. Bruce Fields
Link: https://lore.kernel.org/r/1562799574-13315-1-git-send-email-bfields@redhat.com
Signed-off-by: Greg Kroah-Hartman -
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtl8192e/rtllib_rx.c: In function rtllib_rx_InfraAdhoc:
drivers/staging/rtl8192e/rtllib_rx.c:1303:6: warning:
variable payload set but not used [-Wunused-but-set-variable]Reported-by: Hulk Robot
Signed-off-by: YueHaibing
Link: https://lore.kernel.org/r/20190717143551.29200-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman
04 Jul, 2019
1 commit
-
Variable rtstatus is being initialized with a value that is never
read as it is being overwritten inside a do-while loop. Clean up
the code by removing the redundant initialization.Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
Link: https://lore.kernel.org/r/20190702095647.26378-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman
20 Jun, 2019
1 commit
-
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.Signed-off-by: Hariprasad Kelam
Signed-off-by: Greg Kroah-Hartman
20 May, 2019
1 commit
-
Fix following checkpatch.pl warnings by using %s and __func__
in strings instead of function names.WARNING: Prefer using '"%s...", __func__' to using '_rtl92e_dm_check_rate_adaptive', this function's name, in a string
WARNING: Prefer using '"%s...", __func__' to using 'rtl92e_dm_restore_state', this function's name, in a stringSigned-off-by: Puranjay Mohan
Signed-off-by: Greg Kroah-Hartman
08 May, 2019
1 commit
-
Pull staging / IIO driver updates from Greg KH:
"Here is the big staging and iio driver update for 5.2-rc1.Lots of tiny fixes all over the staging and IIO driver trees here,
along with some new IIO drivers.The "counter" subsystem was added in here as well, as it is needed by
the IIO drivers and subsystem.Also we ended up deleting two drivers, making this pull request remove
a few hundred thousand lines of code, always a nice thing to see. Both
of the drivers removed have been replaced with "real" drivers in their
various subsystem directories, and they will be coming to you from
those locations during this merge window.There are some core vt/selection changes in here, that was due to some
cleanups needed for the speakup fixes. Those have all been acked by
the various subsystem maintainers (i.e. me), so those are ok.We also added a few new drivers, for some odd hardware, giving new
developers plenty to work on with basic coding style cleanups to come
in the near future.Other than that, nothing unusual here.
All of these have been in linux-next for a while with no reported
issues, other than an odd gcc warning for one of the new drivers that
should be fixed up soon"[ I fixed up the warning myself - Linus ]
* tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (663 commits)
staging: kpc2000: kpc_spi: Fix build error for {read,write}q
Staging: rtl8192e: Remove extra space before break statement
Staging: rtl8192u: ieee80211: Fix if-else indentation warning
Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces
staging: most: cdev: fix chrdev_region leak in mod_exit
staging: wlan-ng: Fix improper SPDX comment style
staging: rtl8192u: ieee80211: Resolve ERROR reported by checkpatch
staging: vc04_services: bcm2835-camera: Compress two lines into one line
staging: rtl8723bs: core: Use !x in place of NULL comparison.
staging: rtl8723bs: core: Prefer using the BIT Macro.
staging: fieldbus: anybus-s: fix wait_for_completion_timeout return handling
staging: kpc2000: fix up build problems with readq()
staging: rtlwifi: move remaining phydm .h files
staging: rtlwifi: strip down phydm .h files
staging: rtlwifi: delete the staging driver
staging: fieldbus: anybus-s: rename bus id field to avoid confusion
staging: fieldbus: anybus-s: keep device bus id in bus endianness
Staging: sm750fb: Change *array into *const array
staging: rtl8192u: ieee80211: Fix spelling mistake
staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro
...
03 May, 2019
1 commit
-
Remove extra spaces before "break" statements to fix the following
warnings from checkpatch.plWARNING: Statements should start on a tabstop
+ break;WARNING: Statements should start on a tabstop
+ break;Signed-off-by: Puranjay Mohan
Signed-off-by: Greg Kroah-Hartman
25 Apr, 2019
1 commit
-
The flags field in 'struct shash_desc' never actually does anything.
The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
However, no shash algorithm ever sleeps, making this flag a no-op.With this being the case, inevitably some users who can't sleep wrongly
pass MAY_SLEEP. These would all need to be fixed if any shash algorithm
actually started sleeping. For example, the shash_ahash_*() functions,
which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
from the ahash API to the shash API. However, the shash functions are
called under kmap_atomic(), so actually they're assumed to never sleep.Even if it turns out that some users do need preemption points while
hashing large buffers, we could easily provide a helper function
crypto_shash_update_large() which divides the data into smaller chunks
and calls crypto_shash_update() and cond_resched() for each chunk. It's
not necessary to have a flag in 'struct shash_desc', nor is it necessary
to make individual shash algorithms aware of this at all.Therefore, remove shash_desc::flags, and document that the
crypto_shash_*() functions can be called from any context.Signed-off-by: Eric Biggers
Signed-off-by: Herbert Xu
16 Apr, 2019
4 commits
-
'default n' is the default value for any bool or tristate Kconfig
setting so there is no need to write it explicitly.Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
is not set' for visible symbols") the Kconfig behavior is the same
regardless of 'default n' being present or not:...
One side effect of (and the main motivation for) this change is making
the following two definitions behave exactly the same:config FOO
boolconfig FOO
bool
default nWith this change, neither of these will generate a
'# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
That might make it clearer to people that a bare 'default n' is
redundant.
...Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Greg Kroah-Hartman -
Fix the checkpath error:
CHECK: Blank lines aren't necessary after an open brace '{'Signed-off-by: Daniel Junho
Signed-off-by: Greg Kroah-Hartman -
Fix a coding style issue.
Signed-off-by: Gabriela Bittencourt
Signed-off-by: Greg Kroah-Hartman -
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c: In function 'rtl92e_check_adapter':
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c:36:6: warning:
variable 'VenderID' set but not used [-Wunused-but-set-variable]
u16 VenderID;
^It's never used and can be removed.
Signed-off-by: YueHaibing
Reviewed-by: Mukesh Ojha
Signed-off-by: Greg Kroah-Hartman
03 Apr, 2019
4 commits
-
There is no need for yet-another-copy of the gpl to be in the kernel
source tree, especially for just a single driver. This got added as
part of the import of the driver from when it was a stand-along chunk of
code.Signed-off-by: Greg Kroah-Hartman
-
There were a few files for the rtl8192e driver that did not have SPDX
identifiers on them, so fix that up. At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.Signed-off-by: Greg Kroah-Hartman
-
There are a few remaining drivers/staging/*/Kconfig files that do not
have SPDX identifiers in them. Add the correct GPL-2.0 identifier to
them to make scanning tools happy.Signed-off-by: Greg Kroah-Hartman
-
Fix checkpatch error:
CHECK: spaces preferred around that '+' (ctx:VxV)
99: FILE: drivers/staging/rtl8192e/rtllib_module.c:99:
+ memset(ieee, 0, sizeof(struct rtllib_device)+sizeof_priv);Signed-off-by: Hildo Guillardi Júnior
Signed-off-by: Greg Kroah-Hartman
30 Mar, 2019
1 commit
-
Challenge suggested by coccinelle.
Remove unnecessary parentheses around the right hand of
assignment using the below script.@@
local idexpression id;
expression e;
@@id =
-(
e
-)@@ expression e, e1, e2,e3,e4; @@
e =
-(((e1) & (e2)) |
-(e3 << e4))
+(e1 & e2) |
+(e3 << e4)Signed-off-by: Sanjana Sanikommu
Signed-off-by: Greg Kroah-Hartman
22 Mar, 2019
1 commit
-
use help over --help-- for new help text
Signed-off-by: Anushka Shukla
Signed-off-by: Greg Kroah-Hartman
19 Mar, 2019
1 commit
-
Avoid useless parentheses to the right hand side of an assignment.
Issue found using coccinelle.
The semantic patch that fixes the problem is as follows//
@r1 disable paren@
expression value,e;
@@(
- value = (e)
+ value = e
)@r2 depends on r1@
expression value,e;
constant c;
@@(
- value = (e == c)
+ value = (e == c)
|
- value = (e = c)
+ value = (e >= c)
|
- value = (e != c)
+ value = (e != c)
)
//Signed-off-by: Bhanusree Pola
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2019
2 commits
-
Remove boilerplate license text.
Signed-off-by: Jules Irenge
Signed-off-by: Greg Kroah-Hartman -
Add the SPDX GPL-2.0 license identifier to fix checkpatch.pl warning
Issue found by checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"Signed-off-by: Jules Irenge
Signed-off-by: Greg Kroah-Hartman
01 Mar, 2019
1 commit
-
These changes fixed a checkpatch error for space required before the
open brace '{' as well as a warning for suspect code indent for
conditional statements.Signed-off-by: Oscar Gomez Fuente
Signed-off-by: Greg Kroah-Hartman
21 Feb, 2019
1 commit
-
- adds the SPDX GPL-2.0 license identifier which solves the checkpatch.pl warning
- Removed license boilerplate text
- Issue found with checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"Signed-off-by: Bhanusree Pola
Signed-off-by: Greg Kroah-Hartman
19 Feb, 2019
1 commit
-
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_tx':
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1732:28: warning:
variable 'broad_addr' set but not used [-Wunused-but-set-variable]drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1731:24: warning:
variable 'stype' set but not used [-Wunused-but-set-variable]This remove unnessesary bool variable 'multi_addr, broad_addr, uni_addr'
Also 'stype' never used and can be removed.Signed-off-by: YueHaibing
Signed-off-by: Greg Kroah-Hartman
14 Feb, 2019
2 commits
-
Rename following macro arguments to fix checkpatch warning: Avoid
CamelCase and make the arguments more readable, understandable.
__pIeeeDev -> __ieee_dev
__pTa -> __addressSigned-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename function cpMacAddr to copy_mac_addr in order to fix checkpatch
warning: Avoid CamelCase and make the function name more readable,
understandable.Signed-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman
11 Feb, 2019
6 commits
-
Rename following parameters of function dot11d_update_country to fix
checkpatch warning: Avoid CamelCase and make the parameter names more
readable, understandable.
pTaddr -> address
CoutryIeLen -> country_len
pCoutryIe -> countrySigned-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename following local variables of function dot11d_update_country to
fix checkpatch warning: Avoid CamelCase and make the variable names more
readable, understandable.
NumTriples -> number_of_triples
MaxChnlNum -> max_channel_number
pTriple -> tripleSigned-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename function DOT11D_ScanComplete to dot11d_scan_complete to fix
checkpatch warning: Avoid CamelCase.Signed-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename function Dot11d_UpdateCountryIe to dot11d_update_country to fix
checkpatch warning: Avoid CamelCase.Signed-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename function Dot11d_Reset to dot11d_reset to fix checkpatch warning:
Avoid CamelCase.Signed-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman -
Rename function Dot11d_Channelmap to dot11d_channel_map to fix
checkpatch warning: Avoid CamelCase.Signed-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman
07 Feb, 2019
1 commit
-
Rename following members of struct rtllib_device to fix checkpatch
warning: Avoid CamelCase
pDot11dInfo -> dot11d_info
bGlobalDomain -> global_domain
IbssStartChnl -> bss_start_channelSigned-off-by: Himadri Pandya
Signed-off-by: Greg Kroah-Hartman