* [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
@ 2020-03-30 2:18 Zhiqiang Liu
2020-03-30 8:44 ` Christian Brauner
2020-04-12 20:59 ` Christian Brauner
0 siblings, 2 replies; 6+ messages in thread
From: Zhiqiang Liu @ 2020-03-30 2:18 UTC (permalink / raw)
To: ebiederm, christian.brauner, oleg, tj, guro, joel, jannh, linux-kernel
Cc: Mingfangsen, Yanxiaodan, linfeilong
In kill_pid_usb_asyncio, if signal is not valid, we do not need to
set info struct.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
---
kernel/signal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 9ad8dea93dbb..9cdc9e388a19 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1505,15 +1505,15 @@ int kill_pid_usb_asyncio(int sig, int errno, sigval_t addr,
unsigned long flags;
int ret = -EINVAL;
+ if (!valid_signal(sig))
+ return ret;
+
clear_siginfo(&info);
info.si_signo = sig;
info.si_errno = errno;
info.si_code = SI_ASYNCIO;
*((sigval_t *)&info.si_pid) = addr;
- if (!valid_signal(sig))
- return ret;
-
rcu_read_lock();
p = pid_task(pid, PIDTYPE_PID);
if (!p) {
--
2.19.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
2020-03-30 2:18 [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio Zhiqiang Liu
@ 2020-03-30 8:44 ` Christian Brauner
2020-04-09 3:26 ` Zhiqiang Liu
2020-04-12 20:59 ` Christian Brauner
1 sibling, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2020-03-30 8:44 UTC (permalink / raw)
To: Zhiqiang Liu
Cc: ebiederm, oleg, tj, guro, joel, jannh, linux-kernel, Mingfangsen,
Yanxiaodan, linfeilong
On Mon, Mar 30, 2020 at 10:18:33AM +0800, Zhiqiang Liu wrote:
>
> In kill_pid_usb_asyncio, if signal is not valid, we do not need to
> set info struct.
>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
I'd have done:
if (!valid_signal(sig))
return -EINVAL;
instead of setting ret to EINVAL above but that's mostly a matter of style.
Picking this up unless someone sees a problem with it.
Thank you!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
2020-03-30 8:44 ` Christian Brauner
@ 2020-04-09 3:26 ` Zhiqiang Liu
2020-04-09 6:53 ` Christian Brauner
0 siblings, 1 reply; 6+ messages in thread
From: Zhiqiang Liu @ 2020-04-09 3:26 UTC (permalink / raw)
To: Christian Brauner
Cc: ebiederm, oleg, tj, guro, joel, jannh, linux-kernel, Mingfangsen,
Yanxiaodan, linfeilong
Friendly ping...
On 2020/3/30 16:44, Christian Brauner wrote:
> On Mon, Mar 30, 2020 at 10:18:33AM +0800, Zhiqiang Liu wrote:
>>
>> In kill_pid_usb_asyncio, if signal is not valid, we do not need to
>> set info struct.
>>
>> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
>
> I'd have done:
>
> if (!valid_signal(sig))
> return -EINVAL;
>
> instead of setting ret to EINVAL above but that's mostly a matter of style.
>
> Picking this up unless someone sees a problem with it.
>
> Thank you!
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
>
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
2020-04-09 3:26 ` Zhiqiang Liu
@ 2020-04-09 6:53 ` Christian Brauner
2020-04-09 8:41 ` Zhiqiang Liu
0 siblings, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2020-04-09 6:53 UTC (permalink / raw)
To: Zhiqiang Liu
Cc: ebiederm, oleg, tj, guro, joel, jannh, linux-kernel, Mingfangsen,
Yanxiaodan, linfeilong
On April 9, 2020 5:26:08 AM GMT+02:00, Zhiqiang Liu <liuzhiqiang26@huawei.com> wrote:
>Friendly ping...
>
>On 2020/3/30 16:44, Christian Brauner wrote:
>> On Mon, Mar 30, 2020 at 10:18:33AM +0800, Zhiqiang Liu wrote:
>>>
>>> In kill_pid_usb_asyncio, if signal is not valid, we do not need to
>>> set info struct.
>>>
>>> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
>>
>> I'd have done:
>>
>> if (!valid_signal(sig))
>> return -EINVAL;
>>
>> instead of setting ret to EINVAL above but that's mostly a matter of
>style.
>>
>> Picking this up unless someone sees a problem with it.
>>
>> Thank you!
>> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
>>
>> .
>>
The patches are queued for after rc1. So around next week.
They came too late to make it into the merge window.
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
2020-04-09 6:53 ` Christian Brauner
@ 2020-04-09 8:41 ` Zhiqiang Liu
0 siblings, 0 replies; 6+ messages in thread
From: Zhiqiang Liu @ 2020-04-09 8:41 UTC (permalink / raw)
To: Christian Brauner
Cc: ebiederm, oleg, tj, guro, joel, jannh, linux-kernel, Mingfangsen,
Yanxiaodan, linfeilong
On 2020/4/9 14:53, Christian Brauner wrote:
> On April 9, 2020 5:26:08 AM GMT+02:00, Zhiqiang Liu <liuzhiqiang26@huawei.com> wrote:
>> Friendly ping...
>>
>> On 2020/3/30 16:44, Christian Brauner wrote:
>>> On Mon, Mar 30, 2020 at 10:18:33AM +0800, Zhiqiang Liu wrote:
>>>>
>>>> In kill_pid_usb_asyncio, if signal is not valid, we do not need to
>>>> set info struct.
>>>>
>>>> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
>>>
>>> I'd have done:
>>>
>>> if (!valid_signal(sig))
>>> return -EINVAL;
>>>
>>> instead of setting ret to EINVAL above but that's mostly a matter of
>> style.
>>>
>>> Picking this up unless someone sees a problem with it.
>>>
>>> Thank you!
>>> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
>>>
>>> .
>>>
>
> The patches are queued for after rc1. So around next week.
> They came too late to make it into the merge window.
>
> Christian
>
That is ok, thanks.
Regards.
Zhiqiang Liu.
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio
2020-03-30 2:18 [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio Zhiqiang Liu
2020-03-30 8:44 ` Christian Brauner
@ 2020-04-12 20:59 ` Christian Brauner
1 sibling, 0 replies; 6+ messages in thread
From: Christian Brauner @ 2020-04-12 20:59 UTC (permalink / raw)
To: Zhiqiang Liu
Cc: ebiederm, oleg, tj, guro, joel, jannh, linux-kernel, Mingfangsen,
Yanxiaodan, linfeilong
On Mon, Mar 30, 2020 at 10:18:33AM +0800, Zhiqiang Liu wrote:
>
> In kill_pid_usb_asyncio, if signal is not valid, we do not need to
> set info struct.
>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Applied, thanks!
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-12 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 2:18 [PATCH] signal: check sig before setting info in kill_pid_usb_asyncio Zhiqiang Liu
2020-03-30 8:44 ` Christian Brauner
2020-04-09 3:26 ` Zhiqiang Liu
2020-04-09 6:53 ` Christian Brauner
2020-04-09 8:41 ` Zhiqiang Liu
2020-04-12 20:59 ` Christian Brauner
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).