From 7eab93df878908c758c72a6130cdd2a80d902418 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Thu, 6 Mar 2008 15:05:38 -0800 Subject: [PATCH] --- yaml --- r: 90044 b: refs/heads/master c: e247a8f5d018740220c66bd5df1928d21d277d63 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/tipc/socket.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fffa7e1fab71..1f8de200e9bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8c8696553aa3895c2ad4289537e4af45a8877b62 +refs/heads/master: e247a8f5d018740220c66bd5df1928d21d277d63 diff --git a/trunk/net/tipc/socket.c b/trunk/net/tipc/socket.c index 9ae8e9f74028..3220d5cb5b5d 100644 --- a/trunk/net/tipc/socket.c +++ b/trunk/net/tipc/socket.c @@ -1419,7 +1419,7 @@ static int accept(struct socket *sock, struct socket *newsock, int flags) /** * shutdown - shutdown socket connection * @sock: socket structure - * @how: direction to close (unused; always treated as read + write) + * @how: direction to close (must be SHUT_RDWR) * * Terminates connection (if necessary), then purges socket's receive queue. * @@ -1432,7 +1432,8 @@ static int shutdown(struct socket *sock, int how) struct sk_buff *buf; int res; - /* Could return -EINVAL for an invalid "how", but why bother? */ + if (how != SHUT_RDWR) + return -EINVAL; if (mutex_lock_interruptible(&tsock->lock)) return -ERESTARTSYS;