lkml.org 
[lkml]   [2012]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] swapon: check validity of swap_flags
On Fri, 23 Mar 2012 13:48:35 -0700 (PDT)
Hugh Dickins <hughd@google.com> wrote:

> 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.

It would be safer to emit a nasty message then let the swapon proceed
as before.



\
 
 \ /
  Last update: 2012-03-23 21:57    [W:0.045 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site