[PATCH 1/1] nvmet: do not allow model_number exceed 40 bytes

Max Gurtovoy mgurtovoy at nvidia.com
Tue Mar 16 08:35:37 GMT 2021


On 3/16/2021 5:40 AM, Chaitanya Kulkarni wrote:
> Max,
>
> On 3/15/21 14:50, Sagi Grimberg wrote:
>>>> According to the NVM specifications, the model number size should be
>>>> 40 bytes (bytes 63:24 of the Identify Controller data structure).
>>>> Therefore, any attempt to store a value into model_number which
>>>> exceeds 40 bytes should return an error.
>>>>
>>>> Reviewed-by: Max Gurtovoy <mgurtovoy at nvidia.com>
>>>> Signed-off-by: Noam Gottlieb <ngottlieb at nvidia.com>
>>> The patch looks good to me, but is this patch not intended for 5.13 ?
>>>
>>> Since for 5.13 we have nvmet_subsys_attr_model_store_locked(), this
>>> patch uses nvmet_subsys_attr_model_store().
>>>
>>> Is this a fix for 5.12-rc  ?
>> I think this patch can wait for 5.13 for sure, maybe needs a Fixes
>> tag to help it get back to stable...
>>
> That's what I thought, can you please respin unless there is a reason for
> this to be in 5.12 ?

The function nvmet_subsys_attr_model_store_locked also exist in 5.12 and 
this patch applies on it.

I'm not sure it can't go to 5.12 but no problem we can re-spin it for 5.13.

I guess for Fixes tag we can use commit "013b7ebe5a0d70e nvmet: make 
ctrl model configurable" , right ?




More information about the Linux-nvme mailing list