Re: [PATCH 02/12] bcache: fix a lost wake-up problem caused by mca_cannibalize_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019/11/17 11:32 上午, Eric Wheeler wrote:
> On Wed, 13 Nov 2019, Coly Li wrote:
> 
>> From: Guoju Fang <fangguoju@xxxxxxxxx>
>>
>> This patch fix a lost wake-up problem caused by the race between
>> mca_cannibalize_lock and bch_cannibalize_unlock.
>>
>> Consider two processes, A and B. Process A is executing
>> mca_cannibalize_lock, while process B takes c->btree_cache_alloc_lock
>> and is executing bch_cannibalize_unlock. The problem happens that after
>> process A executes cmpxchg and will execute prepare_to_wait. In this
>> timeslice process B executes wake_up, but after that process A executes
>> prepare_to_wait and set the state to TASK_INTERRUPTIBLE. Then process A
>> goes to sleep but no one will wake up it. This problem may cause bcache
>> device to dead.
>>
>> Signed-off-by: Guoju Fang <fangguoju@xxxxxxxxx>
>> Signed-off-by: Coly Li <colyli@xxxxxxx>
> 
> Add cc stable?
> 

Yes, I agree. Now these patches are applied by Jens, how about
explicitly send these patches to linux-stable after they go upstream ?

Thanks.

Coly Li


> -Eric
> 
> 
>> ---
>>  drivers/md/bcache/bcache.h |  1 +
>>  drivers/md/bcache/btree.c  | 12 ++++++++----
>>  drivers/md/bcache/super.c  |  1 +
>>  3 files changed, 10 insertions(+), 4 deletions(-)
>>
[snip]


-- 

Coly Li



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux