misc: tizen-inform_reboot: Fix to use kernel_write function
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 27 Oct 2022 08:36:02 +0000 (17:36 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 3 Aug 2023 09:35:22 +0000 (18:35 +0900)
Fixed to use kernel_write instead of vfs_write. When using vfs_write,
there is a problem that the user buffer cannot be accessed.

Change-Id: Idb549b9c833188c585395af8191090dda8a5dc4c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/misc/tizen-inform-reboot.c

index 861554a..f85386e 100644 (file)
@@ -41,7 +41,7 @@ static int inform_reboot_notifier(struct notifier_block *nb,
                } else
                        cmd = "norm";
 
-               vfs_write(file, cmd, strlen(cmd), &pos);
+               kernel_write(file, cmd, strlen(cmd), &pos);
 
                down_read(&sb->s_umount);
                sync_filesystem(sb);