Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

exit: Rename module_put_and_exit to module_put_and_kthread_exit

Update module_put_and_exit to call kthread_exit instead of do_exit.

Change the name to reflect this change in functionality. All of the
users of module_put_and_exit are causing the current kthread to exit
so this change makes it clear what is happening. There is no
functional change.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

+17 -17
+2 -2
crypto/algboss.c
··· 67 67 complete_all(&param->larval->completion); 68 68 crypto_alg_put(&param->larval->alg); 69 69 kfree(param); 70 - module_put_and_exit(0); 70 + module_put_and_kthread_exit(0); 71 71 } 72 72 73 73 static int cryptomgr_schedule_probe(struct crypto_larval *larval) ··· 190 190 crypto_alg_tested(param->driver, err); 191 191 192 192 kfree(param); 193 - module_put_and_exit(0); 193 + module_put_and_kthread_exit(0); 194 194 } 195 195 196 196 static int cryptomgr_schedule_test(struct crypto_alg *alg)
+1 -1
fs/cifs/connect.c
··· 1139 1139 } 1140 1140 1141 1141 memalloc_noreclaim_restore(noreclaim_flag); 1142 - module_put_and_exit(0); 1142 + module_put_and_kthread_exit(0); 1143 1143 } 1144 1144 1145 1145 /*
+2 -2
fs/nfs/callback.c
··· 93 93 svc_process(rqstp); 94 94 } 95 95 svc_exit_thread(rqstp); 96 - module_put_and_exit(0); 96 + module_put_and_kthread_exit(0); 97 97 return 0; 98 98 } 99 99 ··· 137 137 } 138 138 } 139 139 svc_exit_thread(rqstp); 140 - module_put_and_exit(0); 140 + module_put_and_kthread_exit(0); 141 141 return 0; 142 142 } 143 143
+1 -1
fs/nfs/nfs4state.c
··· 2689 2689 allow_signal(SIGKILL); 2690 2690 nfs4_state_manager(clp); 2691 2691 nfs_put_client(clp); 2692 - module_put_and_exit(0); 2692 + module_put_and_kthread_exit(0); 2693 2693 return 0; 2694 2694 }
+1 -1
fs/nfsd/nfssvc.c
··· 986 986 987 987 /* Release module */ 988 988 mutex_unlock(&nfsd_mutex); 989 - module_put_and_exit(0); 989 + module_put_and_kthread_exit(0); 990 990 return 0; 991 991 } 992 992
+3 -3
include/linux/module.h
··· 595 595 /* Look for this name: can be of form module:name. */ 596 596 unsigned long module_kallsyms_lookup_name(const char *name); 597 597 598 - extern void __noreturn __module_put_and_exit(struct module *mod, 598 + extern void __noreturn __module_put_and_kthread_exit(struct module *mod, 599 599 long code); 600 - #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code) 600 + #define module_put_and_kthread_exit(code) __module_put_and_kthread_exit(THIS_MODULE, code) 601 601 602 602 #ifdef CONFIG_MODULE_UNLOAD 603 603 int module_refcount(struct module *mod); ··· 790 790 return 0; 791 791 } 792 792 793 - #define module_put_and_exit(code) do_exit(code) 793 + #define module_put_and_kthread_exit(code) kthread_exit(code) 794 794 795 795 static inline void print_modules(void) 796 796 {
+3 -3
kernel/module.c
··· 337 337 * A thread that wants to hold a reference to a module only while it 338 338 * is running can call this to safely exit. nfsd and lockd use this. 339 339 */ 340 - void __noreturn __module_put_and_exit(struct module *mod, long code) 340 + void __noreturn __module_put_and_kthread_exit(struct module *mod, long code) 341 341 { 342 342 module_put(mod); 343 - do_exit(code); 343 + kthread_exit(code); 344 344 } 345 - EXPORT_SYMBOL(__module_put_and_exit); 345 + EXPORT_SYMBOL(__module_put_and_kthread_exit); 346 346 347 347 /* Find a module section: 0 means not found. */ 348 348 static unsigned int find_sec(const struct load_info *info, const char *name)
+1 -1
net/bluetooth/bnep/core.c
··· 535 535 536 536 up_write(&bnep_session_sem); 537 537 free_netdev(dev); 538 - module_put_and_exit(0); 538 + module_put_and_kthread_exit(0); 539 539 return 0; 540 540 } 541 541
+1 -1
net/bluetooth/cmtp/core.c
··· 323 323 up_write(&cmtp_session_sem); 324 324 325 325 kfree(session); 326 - module_put_and_exit(0); 326 + module_put_and_kthread_exit(0); 327 327 return 0; 328 328 } 329 329
+1 -1
net/bluetooth/hidp/core.c
··· 1305 1305 l2cap_unregister_user(session->conn, &session->user); 1306 1306 hidp_session_put(session); 1307 1307 1308 - module_put_and_exit(0); 1308 + module_put_and_kthread_exit(0); 1309 1309 return 0; 1310 1310 } 1311 1311
+1 -1
tools/objtool/check.c
··· 170 170 "do_task_dead", 171 171 "kthread_exit", 172 172 "make_task_dead", 173 - "__module_put_and_exit", 173 + "__module_put_and_kthread_exit", 174 174 "complete_and_exit", 175 175 "__reiserfs_panic", 176 176 "lbug_with_loc",