The commit is pushed to "branch-rh7-3.10.0-1160.80.1.vz7.190.x-ovz" and will
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.80.1.vz7.190.1
------>
commit a334df16a83a71f6176ae3264481aa7d99f2cac3
Author: Alexander Atanasov <[email protected]>
Date: Mon Nov 28 21:49:33 2022 +0200
ms/devtmpfs: fix the dangling pointer of global devtmpfsd thread
When the devtmpfs fails to mount, a dangling pointer still remains in
global. Specifically, the err variable is passed by a pointer to the
devtmpfsd. When the devtmpfsd exits, it sets the error and completes the
setup_done. In this situation, the thread pointer is not set to null.
After the devtmpfsd exited, the devtmpfs can wakes up the destroyed
devtmpfsd thread by wake_up_process if a device change event comes.
Signed-off-by: Yangxi Xiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(mainstream commit 31c779f293b343577690c01369a5019ca6ec5de9)
https://jira.sw.ru/browse/PSBM-142996
Signed-off-by: Alexander Atanasov <[email protected]>
---
drivers/base/devtmpfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 8aefc2dc63a1..eb064072414a 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -485,12 +485,12 @@ int __init devtmpfs_init(void)
wait_for_completion(&setup_done);
} else {
err = PTR_ERR(thread);
- thread = NULL;
}
if (err) {
printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n",
err);
unregister_filesystem(&dev_fs_type);
+ thread = NULL;
return err;
}
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel