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>
This commit is contained in:
parent
7928b2cbe5
commit
9026e820cb
|
@ -123,8 +123,17 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
|
||||||
* so check explicitly for the right codes here.
|
* so check explicitly for the right codes here.
|
||||||
*/
|
*/
|
||||||
if (kinfo->si_signo == SIGBUS &&
|
if (kinfo->si_signo == SIGBUS &&
|
||||||
(kinfo->si_code == BUS_MCEERR_AR ||
|
kinfo->si_code == BUS_MCEERR_AO)
|
||||||
kinfo->si_code == BUS_MCEERR_AO))
|
err |= __put_user((short) kinfo->si_addr_lsb,
|
||||||
|
&uinfo->ssi_addr_lsb);
|
||||||
|
#endif
|
||||||
|
#ifdef BUS_MCEERR_AR
|
||||||
|
/*
|
||||||
|
* Other callers might not initialize the si_lsb field,
|
||||||
|
* so check explicitly for the right codes here.
|
||||||
|
*/
|
||||||
|
if (kinfo->si_signo == SIGBUS &&
|
||||||
|
kinfo->si_code == BUS_MCEERR_AR)
|
||||||
err |= __put_user((short) kinfo->si_addr_lsb,
|
err |= __put_user((short) kinfo->si_addr_lsb,
|
||||||
&uinfo->ssi_addr_lsb);
|
&uinfo->ssi_addr_lsb);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue