From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20170925102303.8288-1-agruenba@redhat.com> References: <20170925102303.8288-1-agruenba@redhat.com> From: Linus Torvalds Date: Tue, 26 Sep 2017 10:12:46 -0700 Message-ID: Subject: Re: [SECOND RESEND] vfs: Return -ENXIO for negative SEEK_HOLE / SEEK_DATA offsets To: Andreas Gruenbacher Cc: Alexander Viro , linux-fsdevel , stable Content-Type: text/plain; charset="UTF-8" Sender: stable-owner@vger.kernel.org List-ID: On Mon, Sep 25, 2017 at 3:23 AM, Andreas Gruenbacher wrote: > > could you please merge the following VFS fix, sent to Al etc. on August > 30 and resent on September 14, with no reaction? This fix seems wrong, or at least misleading. We already error out for negative offsets in vfs_setpos(), except for the special case of /proc//mem, /dev/mem and /dev/kmem (which have that FMODE_UNSIGNED_OFFSET special case). Sure, the error is different (-EINVAL), but that doesn't seem wrong. So my gut feel is that if xfstest generic/448 cares about EINVAL vs ENXIO, then that test is just garbage. Because let's face it, EINVAL is the *normal* error return for negative offsets. Am I missing something? Linus