mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-18 22:14:16 +00:00 
			
		
		
		
	module: Ensure a module's state is set accordingly during module coming cleanup code
In load_module() in the event of an error, for e.g. unknown module parameter(s) specified we go to perform some module coming clean up operations. At this point the module is still in a "formed" state when it is actually going away. This patch updates the module's state accordingly to ensure anyone on the module_notify_list waiting for a module going away notification will be notified accordingly. Signed-off-by: Aaron Tomlin <atomlin@redhat.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: http://lkml.kernel.org/r/1476980293-19062-2-git-send-email-atomlin@redhat.com Signed-off-by: Jessica Yu <jeyu@redhat.com>
This commit is contained in:
		
							parent
							
								
									c714965f58
								
							
						
					
					
						commit
						885a78d4a5
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -3697,6 +3697,7 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
|  sysfs_cleanup: | ||||
| 	mod_sysfs_teardown(mod); | ||||
|  coming_cleanup: | ||||
| 	mod->state = MODULE_STATE_GOING; | ||||
| 	blocking_notifier_call_chain(&module_notify_list, | ||||
| 				     MODULE_STATE_GOING, mod); | ||||
| 	klp_module_going(mod); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Aaron Tomlin
						Aaron Tomlin