diff mbox series

[1/1] shiftfs-5.2: use copy_from_user() correctly

Message ID 20190815143603.17127-2-oleksandr@redhat.com (mailing list archive)
State New, archived
Headers show
Series Small potential fix for shiftfs | expand

Commit Message

Oleksandr Natalenko Aug. 15, 2019, 2:36 p.m. UTC
Signed-off-by: Oleksandr Natalenko <oleksandr@redhat.com>
---
 fs/shiftfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/shiftfs.c b/fs/shiftfs.c
index 49f6714e9f95..14f3764577d8 100644
--- a/fs/shiftfs.c
+++ b/fs/shiftfs.c
@@ -1526,7 +1526,7 @@  static bool in_ioctl_whitelist(int flag, unsigned long arg)
 	case BTRFS_IOC_SUBVOL_GETFLAGS:
 		return true;
 	case BTRFS_IOC_SUBVOL_SETFLAGS:
-		if (copy_from_user(&flags, arg, sizeof(flags)))
+		if (copy_from_user(&flags, argp, sizeof(flags)))
 			return false;
 
 		if (flags & ~BTRFS_SUBVOL_RDONLY)