All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] decnet: fix shutdown parameter checking
@ 2012-08-27  2:37 Xi Wang
  2012-08-27  9:16 ` Steven Whitehouse
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Wang @ 2012-08-27  2:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel, Xi Wang

The allowed value of "how" is SHUT_RD/SHUT_WR/SHUT_RDWR (0/1/2),
rather than SHUTDOWN_MASK (3).

Signed-off-by: Xi Wang <xi.wang@gmail.com>
---
 net/decnet/af_decnet.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 2ba1a28..307c322 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1313,10 +1313,10 @@ static int dn_shutdown(struct socket *sock, int how)
 	if (scp->state == DN_O)
 		goto out;
 
-	if (how != SHUTDOWN_MASK)
+	if (how != SHUT_RDWR)
 		goto out;
 
-	sk->sk_shutdown = how;
+	sk->sk_shutdown = SHUTDOWN_MASK;
 	dn_destroy_sock(sk);
 	err = 0;
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-05 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-27  2:37 [PATCH] decnet: fix shutdown parameter checking Xi Wang
2012-08-27  9:16 ` Steven Whitehouse
2012-08-31 19:57   ` David Miller
2012-09-05  8:37     ` Steven Whitehouse
2012-09-05 17:00       ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.