Re: [PATCH] af_unix: fix shutdown parameter checking

2012-08-31 Thread David Miller
From: Xi Wang Date: Sun, 26 Aug 2012 22:47:13 -0400 > Return -EINVAL rather than 0 given an invalid "mode" parameter. > > Signed-off-by: Xi Wang Applied to net-next -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

[PATCH] af_unix: fix shutdown parameter checking

2012-08-26 Thread Xi Wang
Return -EINVAL rather than 0 given an invalid "mode" parameter. Signed-off-by: Xi Wang --- Another way to check "mode" is as in inet_shutdown(): mode++; if ((mode & ~SHUTDOWN_MASK) || !mode) return -EINVAL; This patch uses a simpler form, to check if "mode" is in