[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABeXuvrKAz3epJjc9J21K-dET1Om9C=3gaDOUiQ96C39x4MAVg@mail.gmail.com>
Date: Thu, 23 May 2019 14:06:45 -0700
From: Deepa Dinamani <deepa.kernel@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: Oleg Nesterov <oleg@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
"dbueso@...e.de" <dbueso@...e.de>,
"axboe@...nel.dk" <axboe@...nel.dk>,
Davidlohr Bueso <dave@...olabs.net>, Eric Wong <e@...24.org>,
Jason Baron <jbaron@...mai.com>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
linux-aio <linux-aio@...ck.org>,
Omar Kilani <omar.kilani@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask()
> Just adding a little more clarification, there is an additional change
> between [a] and [b].
> As per [a] we would just restore the signal instead of changing the
> saved_sigmask and the signal could get delivered right then. [b]
> changes this to happen at syscall exit:
Rewording above, as there seems to be a few misrepresentations:
Just adding a little more clarification, there is an additional change
between [a] and [b].
As per [a] we would just restore the signal mask instead of changing
the saved_sigmask and the even the blocked signals could get delivered
right then. [b] changes the restoration to happen at syscall exit:
> void restore_user_sigmask(const void __user *usigmask, sigset_t *sigsaved)
> {
>
> <snip>
>
> /*
> * When signals are pending, do not restore them here.
> * Restoring sigmask here can lead to delivering signals
> that the above
> * syscalls are intended to block because of the sigmask passed in.
> */
> if (signal_pending(current)) {
> current->saved_sigmask = *sigsaved;
> set_restore_sigmask();
> return;
> }
-Deepa
Powered by blists - more mailing lists