diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-04-12 19:49:28 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 19:49:28 +0200 |
commit | 8065248069097dddf9945acfb2081025e9618c16 (patch) | |
tree | eddf3fb0372ba0f65c01382d386942ea8d18932d /mm/swapfile.c | |
parent | rt2x00: do not generate seqno in h/w if QOS is disabled (diff) | |
parent | NFC: Fix the LLCP Tx fragmentation loop (diff) | |
download | linux-8065248069097dddf9945acfb2081025e9618c16.tar.xz linux-8065248069097dddf9945acfb2081025e9618c16.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index dae42f380d6e..fafc26d1b1dc 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2022,6 +2022,9 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) struct page *page = NULL; struct inode *inode = NULL; + if (swap_flags & ~SWAP_FLAGS_VALID) + return -EINVAL; + if (!capable(CAP_SYS_ADMIN)) return -EPERM; |