mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	<linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	"Alexey Brodkin" <Alexey.Brodkin@synopsys.com>,
	arcml <linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH v2] arch: define weak abort
Date: Tue, 19 Dec 2017 13:55:59 -0800	[thread overview]
Message-ID: <20171219135559.07104711eb9301f5f40a338f@linux-foundation.org> (raw)
In-Reply-To: <f098f672-7b51-26ea-c215-2c3edf72e62b@synopsys.com>

On Tue, 19 Dec 2017 13:39:22 -0800 Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> > --- a/kernel/exit.c
> > +++ b/kernel/exit.c
> > @@ -1759,3 +1759,11 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, int options,
> >   	return -EFAULT;
> >   }
> >   #endif
> > +
> > +__weak void abort(void)
> > +{
> > +	BUG();
> > +
> > +	/* if that doesn't kill us, halt */
> > +	panic("Oops failed to kill thread");
> > +}
> 
> Hmm, I realize there's a small gotcha with this, when testing with a different 
> patch from Arnd. This needs an EXPORT_SYMBOL() as well !

Yup.  This?

From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel/exit.c: export abort() to modules

gcc -fisolate-erroneous-paths-dereference can generate calls to abort()
from modular code too.

Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Alexey Brodkin" <Alexey.Brodkin@synopsys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/exit.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN kernel/exit.c~a kernel/exit.c
--- a/kernel/exit.c~a
+++ a/kernel/exit.c
@@ -1763,3 +1763,4 @@ __weak void abort(void)
 	/* if that doesn't kill us, halt */
 	panic("Oops failed to kill thread");
 }
+EXPORT_SYMBOL(abort);
_

  reply	other threads:[~2017-12-19 21:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 22:49 Sudip Mukherjee
2017-12-13 21:46 ` Alexey Brodkin
2017-12-19 21:39 ` Vineet Gupta
2017-12-19 21:55   ` Andrew Morton [this message]
2017-12-21 23:20     ` Sudip Mukherjee

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=20171219135559.07104711eb9301f5f40a338f@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=sudipm.mukherjee@gmail.com \
    /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®