diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2018-02-12 16:18:38 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-02-22 16:00:07 -0500 |
commit | 9026e820cbd2ea39a06a129ecdddf2739bd3602b (patch) | |
tree | a8c98e6947fee1c2f126f667a2a8fa1db2629f2c | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
fs/signalfd: fix build error for BUS_MCEERR_AR
Fix build error in fs/signalfd.c by using same method that is used in
kernel/signal.c: separate blocks for different signal si_code values.
./fs/signalfd.c: error: 'BUS_MCEERR_AR' undeclared (first use in this function)
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-rw-r--r-- | fs/signalfd.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c index 9990957264e3..76bf9cc62074 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -118,13 +118,22 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, | |||
118 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); | 118 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); |
119 | #endif | 119 | #endif |
120 | #ifdef BUS_MCEERR_AO | 120 | #ifdef BUS_MCEERR_AO |
121 | /* | 121 | /* |
122 | * Other callers might not initialize the si_lsb field, | ||
123 | * so check explicitly for the right codes here. | ||
124 | */ | ||
125 | if (kinfo->si_signo == SIGBUS && | ||
126 | kinfo->si_code == BUS_MCEERR_AO) | ||
127 | err |= __put_user((short) kinfo->si_addr_lsb, | ||
128 | &uinfo->ssi_addr_lsb); | ||
129 | #endif | ||
130 | #ifdef BUS_MCEERR_AR | ||
131 | /* | ||
122 | * Other callers might not initialize the si_lsb field, | 132 | * Other callers might not initialize the si_lsb field, |
123 | * so check explicitly for the right codes here. | 133 | * so check explicitly for the right codes here. |
124 | */ | 134 | */ |
125 | if (kinfo->si_signo == SIGBUS && | 135 | if (kinfo->si_signo == SIGBUS && |
126 | (kinfo->si_code == BUS_MCEERR_AR || | 136 | kinfo->si_code == BUS_MCEERR_AR) |
127 | kinfo->si_code == BUS_MCEERR_AO)) | ||
128 | err |= __put_user((short) kinfo->si_addr_lsb, | 137 | err |= __put_user((short) kinfo->si_addr_lsb, |
129 | &uinfo->ssi_addr_lsb); | 138 | &uinfo->ssi_addr_lsb); |
130 | #endif | 139 | #endif |