Commit 61618f3
module: Clean up ro/nx after early module load failures
commit ff7e005 upstream.
The commit
4982223 module: set nx before marking module MODULE_STATE_COMING.
introduced a regression: if a module fails to parse its arguments or
if mod_sysfs_setup fails, then the module's memory will be freed
while still read-only. Anything that reuses that memory will crash
as soon as it tries to write to it.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c13c282 commit 61618f3
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3308 | 3308 | | |
3309 | 3309 | | |
3310 | 3310 | | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
3311 | 3316 | | |
3312 | 3317 | | |
3313 | 3318 | | |
| |||
0 commit comments