]> git.karo-electronics.de Git - karo-tx-linux.git/commit
signals: kill block_all_signals() and unblock_all_signals()
authorOleg Nesterov <oleg@redhat.com>
Wed, 21 Oct 2015 22:03:58 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:58 +0000 (09:03 +1100)
commit42aaa0cc9e4142f108001da3bb8cad701f533423
tree8b29e56de50881ab076c8e4c1be83b5fb00e3ed2
parentae163ca58e1a6987a357b60a9f9f67301ea673a0
signals: kill block_all_signals() and unblock_all_signals()

It is hardly possible to enumerate all problems with block_all_signals()
and unblock_all_signals().  Just for example,

1. block_all_signals(SIGSTOP/etc) simply can't help if the caller is
   multithreaded. Another thread can dequeue the signal and force the
   group stop.

2. Even is the caller is single-threaded, it will "stop" anyway. It
   will not sleep, but it will spin in kernel space until SIGCONT or
   SIGKILL.

And a lot more. In short, this interface doesn't work at all, at least
the last 10+ years.

Daniel said:

  Yeah the only times I played around with the DRM_LOCK stuff was when
  old drivers accidentally deadlocked - my impression is that the entire
  DRM_LOCK thing was never really tested properly ;-) Hence I'm all for
  purging where this leaks out of the drm subsystem.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Dave Airlie <airlied@redhat.com>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/gpu/drm/drm_lock.c
include/drm/drmP.h
include/linux/sched.h
kernel/signal.c