diff options
Diffstat (limited to 'fs/select.c')
-rw-r--r-- | fs/select.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/select.c b/fs/select.c index 00f58c5c7e05..8dda969614a9 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/personality.h> /* for STICKY_TIMEOUTS */ | 22 | #include <linux/personality.h> /* for STICKY_TIMEOUTS */ |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/fdtable.h> | ||
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/rcupdate.h> | 26 | #include <linux/rcupdate.h> |
26 | 27 | ||
@@ -298,7 +299,7 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout) | |||
298 | #define MAX_SELECT_SECONDS \ | 299 | #define MAX_SELECT_SECONDS \ |
299 | ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) | 300 | ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) |
300 | 301 | ||
301 | static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 302 | int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
302 | fd_set __user *exp, s64 *timeout) | 303 | fd_set __user *exp, s64 *timeout) |
303 | { | 304 | { |
304 | fd_set_bits fds; | 305 | fd_set_bits fds; |
@@ -425,7 +426,7 @@ sticky: | |||
425 | return ret; | 426 | return ret; |
426 | } | 427 | } |
427 | 428 | ||
428 | #ifdef TIF_RESTORE_SIGMASK | 429 | #ifdef HAVE_SET_RESTORE_SIGMASK |
429 | asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, | 430 | asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, |
430 | fd_set __user *exp, struct timespec __user *tsp, | 431 | fd_set __user *exp, struct timespec __user *tsp, |
431 | const sigset_t __user *sigmask, size_t sigsetsize) | 432 | const sigset_t __user *sigmask, size_t sigsetsize) |
@@ -498,7 +499,7 @@ sticky: | |||
498 | if (sigmask) { | 499 | if (sigmask) { |
499 | memcpy(¤t->saved_sigmask, &sigsaved, | 500 | memcpy(¤t->saved_sigmask, &sigsaved, |
500 | sizeof(sigsaved)); | 501 | sizeof(sigsaved)); |
501 | set_thread_flag(TIF_RESTORE_SIGMASK); | 502 | set_restore_sigmask(); |
502 | } | 503 | } |
503 | } else if (sigmask) | 504 | } else if (sigmask) |
504 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 505 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); |
@@ -528,7 +529,7 @@ asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | |||
528 | 529 | ||
529 | return sys_pselect7(n, inp, outp, exp, tsp, up, sigsetsize); | 530 | return sys_pselect7(n, inp, outp, exp, tsp, up, sigsetsize); |
530 | } | 531 | } |
531 | #endif /* TIF_RESTORE_SIGMASK */ | 532 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |
532 | 533 | ||
533 | struct poll_list { | 534 | struct poll_list { |
534 | struct poll_list *next; | 535 | struct poll_list *next; |
@@ -759,7 +760,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
759 | return ret; | 760 | return ret; |
760 | } | 761 | } |
761 | 762 | ||
762 | #ifdef TIF_RESTORE_SIGMASK | 763 | #ifdef HAVE_SET_RESTORE_SIGMASK |
763 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | 764 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, |
764 | struct timespec __user *tsp, const sigset_t __user *sigmask, | 765 | struct timespec __user *tsp, const sigset_t __user *sigmask, |
765 | size_t sigsetsize) | 766 | size_t sigsetsize) |
@@ -805,7 +806,7 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
805 | if (sigmask) { | 806 | if (sigmask) { |
806 | memcpy(¤t->saved_sigmask, &sigsaved, | 807 | memcpy(¤t->saved_sigmask, &sigsaved, |
807 | sizeof(sigsaved)); | 808 | sizeof(sigsaved)); |
808 | set_thread_flag(TIF_RESTORE_SIGMASK); | 809 | set_restore_sigmask(); |
809 | } | 810 | } |
810 | ret = -ERESTARTNOHAND; | 811 | ret = -ERESTARTNOHAND; |
811 | } else if (sigmask) | 812 | } else if (sigmask) |
@@ -839,4 +840,4 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
839 | 840 | ||
840 | return ret; | 841 | return ret; |
841 | } | 842 | } |
842 | #endif /* TIF_RESTORE_SIGMASK */ | 843 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |