[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1396439119.2726.29.camel@menhir>
Date: Wed, 02 Apr 2014 12:45:19 +0100
From: Steven Whitehouse <swhiteho@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Richard Hansen <rhansen@....com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Greg Troxel <gdt@...bbn.com>
Subject: Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC
Hi,
On Wed, 2014-04-02 at 04:10 -0700, Christoph Hellwig wrote:
> On Tue, Apr 01, 2014 at 02:25:45PM -0400, Richard Hansen wrote:
> > For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall
> > be specified, but not both." [1] There was already a test for the
> > "both" condition. Add a test to ensure that the caller specified one
> > of the flags; fail with EINVAL if neither are specified.
>
> This breaks various (sloppy) existing userspace for no gain.
>
> NAK.
>
Agreed. It might be better to have something like:
if (flags == 0)
flags = MS_SYNC;
That way applications which don't set the flags (and possibly also don't
check the return value, so will not notice an error return) will get the
sync they desire. Not that either of those things is desirable, but at
least we can make the best of the situation. Probably better to be slow
than to potentially lose someone's data in this case,
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists