Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1166004AbdD1SZV (ORCPT ); Fri, 28 Apr 2017 14:25:21 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:34404 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165849AbdD1SZO (ORCPT ); Fri, 28 Apr 2017 14:25:14 -0400 Date: Fri, 28 Apr 2017 19:25:12 +0100 From: Al Viro To: Dave Jones , Linux Kernel Subject: Re: iov_iter_pipe warning. Message-ID: <20170428182511.GM29622@ZenIV.linux.org.uk> References: <20170412143519.4hh36l3egozgdrll@codemonkey.org.uk> <20170412152600.GP29622@ZenIV.linux.org.uk> <20170412162709.bn5qfk4seues3yos@codemonkey.org.uk> <20170412170723.GQ29622@ZenIV.linux.org.uk> <20170412190318.srkkdytf2ebrjzrg@codemonkey.org.uk> <20170421175430.GT29622@ZenIV.linux.org.uk> <20170428152955.mafs3f22srmm34aw@codemonkey.org.uk> <20170428164313.GK29622@ZenIV.linux.org.uk> <20170428165024.ofyl2atpjwohekqa@codemonkey.org.uk> <20170428172024.GL29622@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170428172024.GL29622@ZenIV.linux.org.uk> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 26 On Fri, Apr 28, 2017 at 06:20:25PM +0100, Al Viro wrote: > On Fri, Apr 28, 2017 at 12:50:24PM -0400, Dave Jones wrote: > > currently running v4.11-rc8-75-gf83246089ca0 > > > > sunrpc bit is for the other unrelated problem I'm chasing. > > > > note also, I saw the backtrace without the fs/splice.c changes. > > Interesting... Could you add this and see if that triggers? Gyah... It's a bloody dumb braino in iov_iter_revert() for pipe-backed ones. Sorry, the oneliner below should fix it. diff --git a/lib/iov_iter.c b/lib/iov_iter.c index f7c93568ec99..4952311422c1 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -798,7 +798,7 @@ void iov_iter_revert(struct iov_iter *i, size_t unroll) while (1) { size_t n = off - pipe->bufs[idx].offset; if (unroll < n) { - off -= (n - unroll); + off -= unroll; break; } unroll -= n;