Skip to content

Commit e200327

Browse files
bjdooks-ctAl Viro
authored andcommitted
fs/fnctl: fix missing __user in fcntl_rw_hint()
The fcntl_rw_hint() has a missing __user annotation in the code when assinging argp. Add this to fix the following sparse warnings: fs/fcntl.c:280:22: warning: incorrect type in initializer (different address spaces) fs/fcntl.c:280:22: expected unsigned long long [usertype] *argp fs/fcntl.c:280:22: got unsigned long long [noderef] [usertype] <asn:1> * fs/fcntl.c:287:34: warning: incorrect type in argument 1 (different address spaces) fs/fcntl.c:287:34: expected void [noderef] <asn:1> *to fs/fcntl.c:287:34: got unsigned long long [usertype] *argp fs/fcntl.c:291:40: warning: incorrect type in argument 2 (different address spaces) fs/fcntl.c:291:40: expected void const [noderef] <asn:1> *from fs/fcntl.c:291:40: got unsigned long long [usertype] *argp fs/fcntl.c:303:34: warning: incorrect type in argument 1 (different address spaces) fs/fcntl.c:303:34: expected void [noderef] <asn:1> *to fs/fcntl.c:303:34: got unsigned long long [usertype] *argp fs/fcntl.c:307:40: warning: incorrect type in argument 2 (different address spaces) fs/fcntl.c:307:40: expected void const [noderef] <asn:1> *from fs/fcntl.c:307:40: got unsigned long long [usertype] *argp Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 54ecb8f commit e200327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static long fcntl_rw_hint(struct file *file, unsigned int cmd,
277277
unsigned long arg)
278278
{
279279
struct inode *inode = file_inode(file);
280-
u64 *argp = (u64 __user *)arg;
280+
u64 __user *argp = (u64 __user *)arg;
281281
enum rw_hint hint;
282282
u64 h;
283283

0 commit comments

Comments
 (0)