Re: [PATCH v4 8/9] s390/vfio-ap: Fix NULL deref in status_show() during queue probe
From: Matthew Rosato
Date: Wed Aug 12 2026 - 14:56:57 EST
>>
>> Do you think adding an additional NULL check against dev_get_drvdata()
>> in status_show() and treating the NULL case like the other error
>> conditions would be enough to cover that window?
>
> It would cover that window, but that function does not return any error, so
> we'd have to decide what makes the most sense between the following
> three values, or create new one to indicate we don't know the status.
>
> AP_QUEUE_ASSIGNED
> AP_QUEUE_UNASSIGNED
> AP_QUEUE_IN_USE
>
If there's no drvdata then it can't be assigned, right? So maybe
AP_QUEUE_UNASSIGNED? Unless you can think of a reason it would not work?