Return-Path: Received: from out02.mta.xmission.com ([166.70.13.232]:57846 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933132AbeBMCSW (ORCPT ); Mon, 12 Feb 2018 21:18:22 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Randy Dunlap Cc: LKML , Al Viro , Linux FS Devel , Geert Uytterhoeven References: <8a85cfae-0c26-e50c-9b26-582802a7f3eb@infradead.org> Date: Mon, 12 Feb 2018 20:18:02 -0600 In-Reply-To: <8a85cfae-0c26-e50c-9b26-582802a7f3eb@infradead.org> (Randy Dunlap's message of "Mon, 12 Feb 2018 13:18:38 -0800") Message-ID: <87tvul4opx.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [PATCH] fs/signalfd: fix build error for BUS_MCEERR_AR Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Randy Dunlap writes: > From: Randy Dunlap > > 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 > Signed-off-by: Randy Dunlap > Cc: Eric Biederman > Cc: Alexander Viro Acked-by: "Eric W. Biederman" Do you want to me to pick this one up? Or does it have another path into mainline? Eric > --- > fs/signalfd.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > Applies to mainline 4.16-rc1. > > --- linux-next-20180212.orig/fs/signalfd.c > +++ linux-next-20180212/fs/signalfd.c > @@ -118,13 +118,22 @@ static int signalfd_copyinfo(struct sign > err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); > #endif > #ifdef BUS_MCEERR_AO > - /* > + /* > * 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 || > - 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, > &uinfo->ssi_addr_lsb); > #endif