diff mbox series

[2/2,SRU,Disco] UBUNTU: SAUCE: shiftfs: pass correct point down

Message ID 20190719155047.5885-3-christian.brauner@ubuntu.com
State New
Headers show
Series shiftfs: bugfix and O_DIRECT support | expand

Commit Message

Christian Brauner July 19, 2019, 3:50 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1837231

This used to pass an unsigned long to copy_from_user() instead of a
void __user * pointer. This will produce warning with a sufficiently
advanced compiler.

Cc: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.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 addaa6e21e57..9006201c243d 100644
--- a/fs/shiftfs.c
+++ b/fs/shiftfs.c
@@ -1529,7 +1529,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)