[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <154008a8-9d29-2411-28a0-0284a95b4481@codeaurora.org>
Date: Tue, 11 Jun 2019 10:09:06 +0530
From: Gaurav Kohli <gkohli@...eaurora.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Qian Cai <cai@....pw>,
akpm@...ux-foundation.org, hch@....de, mingo@...hat.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: fix a crash in do_task_dead()
>>> +
>>
>> Hi Peter, Jen,
>>
>> As we are not taking pi_lock here , is there possibility of same task dead
>> call comes as this point of time for current thread, bcoz of which we have
>> seen earlier issue after this commit 0619317ff8ba
>> [T114538] do_task_dead+0xf0/0xf8
>> [T114538] do_exit+0xd5c/0x10fc
>> [T114538] do_group_exit+0xf4/0x110
>> [T114538] get_signal+0x280/0xdd8
>> [T114538] do_notify_resume+0x720/0x968
>> [T114538] work_pending+0x8/0x10
>>
>> Is there a chance of TASK_DEAD set at this point of time?
>
> In this case try_to_wake_up(current, TASK_NORMAL) will do nothing, see the
> if (!(p->state & state)) above.
>
> See also the comment about set_special_state() above. It disables irqs and
> this is enough to ensure that try_to_wake_up(current) from irq can't race
> with set_special_state(TASK_DEAD).
Thanks Oleg,
I missed that part(both thread and interrupt is in same core only), So
that situation would never come.
>
> Oleg.
>
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists