Whamcloud - gitweb
LU-9859 libcfs: improve API and implementation of blocking signals. 11/35411/11
authorNeilBrown <neilb@suse.de>
Wed, 11 Mar 2020 13:01:09 +0000 (09:01 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Mar 2020 05:16:29 +0000 (05:16 +0000)
commitec1b20e72282d6a9407c350f0328bd4ce74b2352
tree7532bf2853581e221d178079db80ef350df9f947
parentc700b4a410ab5542391d006ce541023ecf9b7a5d
LU-9859 libcfs: improve API and implementation of blocking signals.

According to comment for set_current_blocked() in
kernel/signal.c, changing ->blocked directly is wrong.
sigprocmask() should be called instead.

So change cfs_block_sigsinv() and cfs_restore_sigs()
to use sigprocmask().
For consistency, change them to pass the sigset_t by reference
rather than by value.

Also fix cfs_block_sigsinv() so that it correctly blocks
signals above 32 on a 32bit host.

Linux-commit: 84e07b9d0ac8728b1865b23498d746861a8ab4c2

Change-Id: Iffb8b39ee2b988e9909ceaaba50446eecdf7f249
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35411
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs.h
libcfs/include/libcfs/linux/linux-wait.h
libcfs/libcfs/linux/linux-prim.c
lustre/llite/llite_mmap.c
lustre/ptlrpc/client.c