diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 13:49:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-01 13:49:25 -0400 |
commit | 02201e3f1b46aed7c6348f406b7b40de80ba6de3 (patch) | |
tree | 2392c9098359725c195dd82a72b20ccedc1a1509 /arch/um | |
parent | 0890a264794f33df540fbaf274699146903b4e6b (diff) | |
parent | 20bdc2cfdbc484777b30b96fcdbb8994038f3ce1 (diff) |
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module updates from Rusty Russell:
"Main excitement here is Peter Zijlstra's lockless rbtree optimization
to speed module address lookup. He found some abusers of the module
lock doing that too.
A little bit of parameter work here too; including Dan Streetman's
breaking up the big param mutex so writing a parameter can load
another module (yeah, really). Unfortunately that broke the usual
suspects, !CONFIG_MODULES and !CONFIG_SYSFS, so those fixes were
appended too"
* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (26 commits)
modules: only use mod->param_lock if CONFIG_MODULES
param: fix module param locks when !CONFIG_SYSFS.
rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
module: add per-module param_lock
module: make perm const
params: suppress unused variable error, warn once just in case code changes.
modules: clarify CONFIG_MODULE_COMPRESS help, suggest 'N'.
kernel/module.c: avoid ifdefs for sig_enforce declaration
kernel/workqueue.c: remove ifdefs over wq_power_efficient
kernel/params.c: export param_ops_bool_enable_only
kernel/params.c: generalize bool_enable_only
kernel/module.c: use generic module param operaters for sig_enforce
kernel/params: constify struct kernel_param_ops uses
sysfs: tightened sysfs permission checks
module: Rework module_addr_{min,max}
module: Use __module_address() for module_address_lookup()
module: Make the mod_tree stuff conditional on PERF_EVENTS || TRACING
module: Optimize __module_address() using a latched RB-tree
rbtree: Implement generic latch_tree
seqlock: Introduce raw_read_seqcount_latch()
...
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/hostaudio_kern.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index 9b90fdc4b151..f6b911cc3923 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
@@ -185,9 +185,9 @@ static int hostaudio_open(struct inode *inode, struct file *file) | |||
185 | int ret; | 185 | int ret; |
186 | 186 | ||
187 | #ifdef DEBUG | 187 | #ifdef DEBUG |
188 | kparam_block_sysfs_write(dsp); | 188 | kernel_param_lock(THIS_MODULE); |
189 | printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp); | 189 | printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp); |
190 | kparam_unblock_sysfs_write(dsp); | 190 | kernel_param_unlock(THIS_MODULE); |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); | 193 | state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); |
@@ -199,11 +199,11 @@ static int hostaudio_open(struct inode *inode, struct file *file) | |||
199 | if (file->f_mode & FMODE_WRITE) | 199 | if (file->f_mode & FMODE_WRITE) |
200 | w = 1; | 200 | w = 1; |
201 | 201 | ||
202 | kparam_block_sysfs_write(dsp); | 202 | kernel_param_lock(THIS_MODULE); |
203 | mutex_lock(&hostaudio_mutex); | 203 | mutex_lock(&hostaudio_mutex); |
204 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); | 204 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); |
205 | mutex_unlock(&hostaudio_mutex); | 205 | mutex_unlock(&hostaudio_mutex); |
206 | kparam_unblock_sysfs_write(dsp); | 206 | kernel_param_unlock(THIS_MODULE); |
207 | 207 | ||
208 | if (ret < 0) { | 208 | if (ret < 0) { |
209 | kfree(state); | 209 | kfree(state); |
@@ -260,17 +260,17 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file) | |||
260 | if (file->f_mode & FMODE_WRITE) | 260 | if (file->f_mode & FMODE_WRITE) |
261 | w = 1; | 261 | w = 1; |
262 | 262 | ||
263 | kparam_block_sysfs_write(mixer); | 263 | kernel_param_lock(THIS_MODULE); |
264 | mutex_lock(&hostaudio_mutex); | 264 | mutex_lock(&hostaudio_mutex); |
265 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); | 265 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); |
266 | mutex_unlock(&hostaudio_mutex); | 266 | mutex_unlock(&hostaudio_mutex); |
267 | kparam_unblock_sysfs_write(mixer); | 267 | kernel_param_unlock(THIS_MODULE); |
268 | 268 | ||
269 | if (ret < 0) { | 269 | if (ret < 0) { |
270 | kparam_block_sysfs_write(dsp); | 270 | kernel_param_lock(THIS_MODULE); |
271 | printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " | 271 | printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " |
272 | "err = %d\n", dsp, -ret); | 272 | "err = %d\n", dsp, -ret); |
273 | kparam_unblock_sysfs_write(dsp); | 273 | kernel_param_unlock(THIS_MODULE); |
274 | kfree(state); | 274 | kfree(state); |
275 | return ret; | 275 | return ret; |
276 | } | 276 | } |
@@ -326,10 +326,10 @@ MODULE_LICENSE("GPL"); | |||
326 | 326 | ||
327 | static int __init hostaudio_init_module(void) | 327 | static int __init hostaudio_init_module(void) |
328 | { | 328 | { |
329 | __kernel_param_lock(); | 329 | kernel_param_lock(THIS_MODULE); |
330 | printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", | 330 | printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", |
331 | dsp, mixer); | 331 | dsp, mixer); |
332 | __kernel_param_unlock(); | 332 | kernel_param_unlock(THIS_MODULE); |
333 | 333 | ||
334 | module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); | 334 | module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); |
335 | if (module_data.dev_audio < 0) { | 335 | if (module_data.dev_audio < 0) { |