Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88096
b: refs/heads/master
c: ffc41cf
h: refs/heads/master
v: v3
  • Loading branch information
Mike Snitzer authored and Linus Torvalds committed Apr 2, 2008
1 parent 1bda9a7 commit 88a596c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b2ea692ec01768c77a4f532dcd060316460122
refs/heads/master: ffc41cf8dbb1b895a87daf47d0e5bf6dfbfcab4c
6 changes: 6 additions & 0 deletions trunk/drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
struct kvec iov;
sigset_t blocked, oldset;

if (unlikely(!sock)) {
printk(KERN_ERR "%s: Attempted %s on closed socket in sock_xmit\n",
lo->disk->disk_name, (send ? "send" : "recv"));
return -EINVAL;
}

/* Allow interception of SIGKILL only
* Don't allow other signals to interrupt the transmission */
siginitsetinv(&blocked, sigmask(SIGKILL));
Expand Down

0 comments on commit 88a596c

Please sign in to comment.