Re: [PATCH] bcache:fix oops in cache_set_flush

Coly Li <[email protected]>
Newsgroups org.kernel.vger.linux-bcache,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

> 2024年11月26日 23:38,Coly Li <[email protected]> 写道:
> 
> 
> 
>> 2024年11月19日 12:19,liequan che <[email protected]> 写道:
>> 
> 
> [snipped]
> 
>>>> 7. Repartition again, triggering kernel panic again.
>>>> parted -s --align optimal /dev/nvme2n1 mkpart primary 2048s 1536GiB
>>>> The same operation was performed on the other two servers, and no
>>>> panic was triggered.
>> 
>>> I guess this is another undefine operation. I assume the cache device is still references somewhere. A reboot should follow the wipefs.
>> Your guess is correct. In addition, after erasing the superblock
>> information in CD rescue mode,
>> I rebooted into the system where the original panic kernel was located.
>> 
> 
> Please try latest upstream kernel and try whether you can see the issue.
> 
> c->root is allocated by __bch_btree_node_alloc(), it doesn’t return NULL pointer.

I need to withdraw the above inaccurate comments. It c->root cannot be NULL from __bch_btree_node_alloc(), but it can be NULL if previous lines failed and went to the error code path.

Thanks to commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in node allocations”). Could you please to compose a patch to partially revert it? The change is same, but change the commit log to mention that your change partially revert commit 028ddcac477b.


Thanks.

Coly Li
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.