[PATCH v3] nvme-tcp: fix a possible UAF when failing to allocate an io queue

Sagi Grimberg sagi at grimberg.me
Wed Mar 22 01:18:19 PDT 2023


>>> +#ifdef CONFIG_NET_RX_BUSY_POLL
>>> +	queue->sock->sk->sk_ll_usec = 1;
>>> +#endif
>>> +	write_unlock_bh(&queue->sock->sk->sk_callback_lock);
>>> +}
>>> +
>>
>> since its is not in the fast path, is there a particular reason not
>> to use following ?
>>
>> if (IS_ENABLED(CONFIG_NET_RX_BUSY_POLL)
>> 	queue->sock->sk->sk_ll_usec = 1;
> 
> That won't compile, as the sk_ll_usec is not defined without
> CONFIG_NET_RX_BUSY_POLL.

I didn't check with CONFIG_NET_RX_BUSY_POLL=n, so you can
disregard v4 if that's the case.



More information about the Linux-nvme mailing list