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

Re: [PATCH] nbd: Fix NULL pointer in flush_workqueue



>>>       if (!refcount_inc_not_zero(&nbd->refs)) {
>>>           mutex_unlock(&nbd_index_mutex);
>>> +        mutex_unlock(&nbd->config_lock);
>> Can an other function call order become relevant for the unlocking of these mutexes?
> Do you think the nbd->config_lock  mutex here is useless?

I proposed to consider the possibility for an alternative ordering of unlock calls
once more for the implementation of the function “nbd_genl_disconnect”.


>> How do you think about to connect the code from this if branch
>> with a jump target like “unlock” so that such statements would be shareable
>> for the desired exception handling?
> OK, I will improve it in V2 patch.

You have continued the software evolution.
https://lore.kernel.org/patchwork/patch/1373539/
[🔎] 20210201081918.558905-1-sunke32@huawei.com/">https://lore.kernel.org/linux-block/[🔎] 20210201081918.558905-1-sunke32@huawei.com/

Regards,
Markus


Reply to: