mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] fs/signalfd: fix build error for BUS_MCEERR_AR
Date: Mon, 12 Feb 2018 18:19:41 -0800	[thread overview]
Message-ID: <3b0d0b5c-a839-87e0-a2cd-76d5780ee6a7@infradead.org> (raw)
In-Reply-To: <87tvul4opx.fsf@xmission.com>

On 02/12/2018 06:18 PM, Eric W. Biederman wrote:
> Randy Dunlap <rdunlap@infradead.org> writes:
> 
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> 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: Eric Biederman <ebiederm@xmission.com>
>> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> 
> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> Do you want to me to pick this one up?  Or does it have another path
> into mainline?
> 

Just via you or Al. You might as well take it.

Thanks.

> 
>> ---
>>  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


-- 
~Randy

      reply	other threads:[~2018-02-13  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 21:18 Randy Dunlap
2018-02-13  2:18 ` Eric W. Biederman
2018-02-13  2:19   ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b0d0b5c-a839-87e0-a2cd-76d5780ee6a7@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®