From: Hugh Dickins Date: Wed, 28 Mar 2012 21:42:42 +0000 (-0700) Subject: swapon: check validity of swap_flags X-Git-Tag: v3.4-rc1~53^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d15cab975459fb6092eeba1be72c13621337784f;p=pandora-kernel.git swapon: check validity of swap_flags Most system calls taking flags first check that the flags passed in are valid, and that helps userspace to detect when new flags are supported. But swapon never did so: start checking now, to help if we ever want to support more swap_flags in future. It's difficult to get stray bits set in an int, and swapon is not widely used, so this is most unlikely to break any userspace; but we can just revert if it turns out to do so. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed