Skip to content

Commit 344af27

Browse files
chleroybrauner
authored andcommitted
select: Fix unbalanced user_access_end()
While working on implementing user access validation on powerpc I got the following warnings on a pmac32_defconfig build: CC fs/select.o fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable On powerpc/32s, user_read_access_begin/end() are no-ops, but the failure path has a user_access_end() instead of user_read_access_end() which means an access end without any prior access begin. Replace that user_access_end() by user_read_access_end(). Fixes: 7e71609 ("pselect6() and friends: take handling the combined 6th/7th args into helper") Signed-off-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/a7139e28d767a13e667ee3c79599a8047222ef36.1736751221.git.christophe.leroy@csgroup.eu Signed-off-by: Christian Brauner <[email protected]>
1 parent 5cf8f93 commit 344af27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/select.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ static inline int get_sigset_argpack(struct sigset_argpack *to,
786786
}
787787
return 0;
788788
Efault:
789-
user_access_end();
789+
user_read_access_end();
790790
return -EFAULT;
791791
}
792792

@@ -1355,7 +1355,7 @@ static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
13551355
}
13561356
return 0;
13571357
Efault:
1358-
user_access_end();
1358+
user_read_access_end();
13591359
return -EFAULT;
13601360
}
13611361

0 commit comments

Comments
 (0)