Skip to content

Commit 9026e82

Browse files
rddunlapebiederm
authored andcommitted
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>
1 parent 7928b2c commit 9026e82

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

fs/signalfd.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,22 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
118118
err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
119119
#endif
120120
#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+
/*
122132
* Other callers might not initialize the si_lsb field,
123133
* so check explicitly for the right codes here.
124134
*/
125135
if (kinfo->si_signo == SIGBUS &&
126-
(kinfo->si_code == BUS_MCEERR_AR ||
127-
kinfo->si_code == BUS_MCEERR_AO))
136+
kinfo->si_code == BUS_MCEERR_AR)
128137
err |= __put_user((short) kinfo->si_addr_lsb,
129138
&uinfo->ssi_addr_lsb);
130139
#endif

0 commit comments

Comments
 (0)