aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index b53fdb0a282c..60cc54368b66 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -153,6 +153,12 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
153 struct kvec iov; 153 struct kvec iov;
154 sigset_t blocked, oldset; 154 sigset_t blocked, oldset;
155 155
156 if (unlikely(!sock)) {
157 printk(KERN_ERR "%s: Attempted %s on closed socket in sock_xmit\n",
158 lo->disk->disk_name, (send ? "send" : "recv"));
159 return -EINVAL;
160 }
161
156 /* Allow interception of SIGKILL only 162 /* Allow interception of SIGKILL only
157 * Don't allow other signals to interrupt the transmission */ 163 * Don't allow other signals to interrupt the transmission */
158 siginitsetinv(&blocked, sigmask(SIGKILL)); 164 siginitsetinv(&blocked, sigmask(SIGKILL));