linux_dsm_epyc7002/drivers/net/wireless
Dan Streetman b51d23e4e9 module: add per-module param_lock
Add a "param_lock" mutex to each module, and update params.c to use
the correct built-in or module mutex while locking kernel params.
Remove the kparam_block_sysfs_r/w() macros, replace them with direct
calls to kernel_param_[un]lock(module).

The kernel param code currently uses a single mutex to protect
modification of any and all kernel params.  While this generally works,
there is one specific problem with it; a module callback function
cannot safely load another module, i.e. with request_module() or even
with indirect calls such as crypto_has_alg().  If the module to be
loaded has any of its params configured (e.g. with a /etc/modprobe.d/*
config file), then the attempt will result in a deadlock between the
first module param callback waiting for modprobe, and modprobe trying to
lock the single kernel param mutex to set the new module's param.

This fixes that by using per-module mutexes, so that each individual module
is protected against concurrent changes in its own kernel params, but is
not blocked by changes to other module params.  All built-in modules
continue to use the built-in mutex, since they will always be loaded at
runtime and references (e.g. request_module(), crypto_has_alg()) to them
will never cause load-time param changing.

This also simplifies the interface used by modules to block sysfs access
to their params; while there are currently functions to block and unblock
sysfs param access which are split up by read and write and expect a single
kernel param to be passed, their actual operation is identical and applies
to all params, not just the one passed to them; they simply lock and unlock
the global param mutex.  They are replaced with direct calls to
kernel_param_[un]lock(THIS_MODULE), which locks THIS_MODULE's param_lock, or
if the module is built-in, it locks the built-in mutex.

Suggested-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-23 15:27:38 +09:30
..
ath kernel/params: constify struct kernel_param_ops uses 2015-05-28 11:32:10 +09:30
b43 wireless: Use bool function returns of true/false instead of 1/0 2015-04-07 20:10:23 +03:00
b43legacy wireless: Use bool function returns of true/false instead of 1/0 2015-04-07 20:10:23 +03:00
brcm80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
cw1200 Major changes: 2015-04-01 14:27:28 -04:00
hostap wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
ipw2x00 Lots of updates for net-next; along with the usual flurry 2015-03-31 16:39:04 -04:00
iwlegacy Major changes: 2015-03-06 15:46:08 -05:00
iwlwifi iwlwifi: mvm: force quota update update after FW restart 2015-04-28 15:02:25 +03:00
libertas Lots of updates for net-next; along with the usual flurry 2015-03-31 16:39:04 -04:00
libertas_tf module: add per-module param_lock 2015-06-23 15:27:38 +09:30
mwifiex Major changes: 2015-04-01 14:27:28 -04:00
orinoco Lots of updates for net-next; along with the usual flurry 2015-03-31 16:39:04 -04:00
p54 wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
prism54
rsi
rt2x00 rt2800usb: check Autorun mode on FW load only once 2015-03-30 11:29:16 +03:00
rtl818x
rtlwifi rtlwifi: rtl8192cu: Fix kernel deadlock 2015-04-28 13:55:28 +03:00
ti ARM: DT updates for v4.1 2015-04-22 09:09:46 -07:00
zd1211rw
adm8211.c
adm8211.h
airo_cs.c
airo.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
airo.h
at76c50x-usb.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
at76c50x-usb.h
atmel_cs.c
atmel_pci.c
atmel.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
atmel.h
Kconfig
mac80211_hwsim.c Lots of updates for net-next; along with the usual flurry 2015-03-31 16:39:04 -04:00
mac80211_hwsim.h
Makefile
mwl8k.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
ray_cs.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
ray_cs.h
rayctl.h
rndis_wlan.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
wl3501_cs.c
wl3501.h
zd1201.c
zd1201.h