Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1344dd86 authored by Kees Cook's avatar Kees Cook
Browse files

pstore: Avoid race in module unloading



Technically, it might be possible for struct pstore_info to go out of
scope after the module_put(), so report the backend name first.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 6330d553
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -722,10 +722,10 @@ int pstore_register(struct pstore_info *psi)
	 */
	backend = psi->name;

	module_put(owner);

	pr_info("Registered %s as persistent store backend\n", psi->name);

	module_put(owner);

	return 0;
}
EXPORT_SYMBOL_GPL(pstore_register);