[PATCH 0/2] nvme: sanitize KATO handling

Hannes Reinecke hare at suse.de
Wed Feb 24 02:06:58 EST 2021


On 2/24/21 7:42 AM, Chao Leng wrote:
> 
> 
> On 2021/2/23 20:07, Hannes Reinecke wrote:
>> Hi all,
>>
>> one of our customer had been running into a deadlock trying to terminate
>> outstanding KATO commands during reset.
>> Looking closer at it, I found that we never actually _track_ if a KATO
>> command is submitted, so we might happily be sending several KATO 
>> commands
>> to the same controller simultaneously.
> Can you explain how can send KATO commands simultaneously?

Sure.
Call nvme_start_keep_alive() on a dead connection.
Just _after_ the KATO request has been sent,
call nvme_start_keep_alive() again.

You now have an expired KATO command, and the new KATO command, both are 
active and sent to the controller.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list