Skip to content
Commit cf1b2326 authored by Mike Christie's avatar Mike Christie Committed by Jens Axboe
Browse files

nbd: verify socket is supported during setup



nbd requires socket families to support the shutdown method so the nbd
recv workqueue can be woken up from its sock_recvmsg call. If the socket
does not support the callout we will leave recv works running or get hangs
later when the device or module is removed.

This adds a check during socket connection/reconnection to make sure the
socket being passed in supports the needed callout.

Reported-by: default avatar <syzbot+24c12fa8d218ed26011a@syzkaller.appspotmail.com>
Fixes: e9e006f5

 ("nbd: fix max number of supported devs")
Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 962399bb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment