linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] signal: Export signal_wake_up_state() to modules
@ 2017-05-05  9:49 Geert Uytterhoeven
  2017-05-05 10:07 ` Christoph Hellwig
  2017-05-06 19:42 ` Oleg Nesterov
  0 siblings, 2 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2017-05-05  9:49 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Oleg Nesterov, Thomas Gleixner
  Cc: linux-kernel, linux-spi, Geert Uytterhoeven

When using signal_wake_up() from a loadable kernel module:

    ERROR: "signal_wake_up_state" [drivers/spi/spi-sh-msiof.ko] undefined!

Export signal_wake_up_state() to modules to fix this.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
I'm using signal_wake_up() to abort a task blocked on
wait_for_completion_interruptible(), cfr. sh_msiof_slave_abort() in
"spi: sh-msiof: Add slave mode support"
(http://www.spinics.net/lists/devicetree/msg175575.html).

Is exporting signal_wake_up_state() an acceptable solution?
Alternatively, I can extract the code to abort an completion into a
generic abort_completion() function, and export that.

Or is there a better way to abort a completion?

Thanks!
---
 kernel/signal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/signal.c b/kernel/signal.c
index 7e59ebc2c25e669e..f130598acd34f08b 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -660,6 +660,7 @@ void signal_wake_up_state(struct task_struct *t, unsigned int state)
 	if (!wake_up_state(t, state | TASK_INTERRUPTIBLE))
 		kick_process(t);
 }
+EXPORT_SYMBOL_GPL(signal_wake_up_state);
 
 /*
  * Remove signals in mask from the pending set and queue.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-07 23:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05  9:49 [PATCH/RFC] signal: Export signal_wake_up_state() to modules Geert Uytterhoeven
2017-05-05 10:07 ` Christoph Hellwig
2017-05-05 10:13   ` Geert Uytterhoeven
2017-05-05 11:08     ` Geert Uytterhoeven
2017-05-05 11:22       ` Christoph Hellwig
2017-05-05 11:35         ` Geert Uytterhoeven
2017-05-06 19:42 ` Oleg Nesterov
2017-05-07  9:47   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).