Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbdDKAWR (ORCPT ); Mon, 10 Apr 2017 20:22:17 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:50686 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbdDKAWQ (ORCPT ); Mon, 10 Apr 2017 20:22:16 -0400 Date: Tue, 11 Apr 2017 01:22:15 +0100 From: Al Viro To: Dave Jones , Linux Kernel Subject: Re: iov_iter_pipe warning. Message-ID: <20170411002215.GE29622@ZenIV.linux.org.uk> References: <20170321205901.mojmjd2fxmykq3df@codemonkey.org.uk> <20170410192800.GC29622@ZenIV.linux.org.uk> <20170410194206.loesu5licstif7or@codemonkey.org.uk> <20170410195711.GD29622@ZenIV.linux.org.uk> <20170410234830.tmqdhpjtfdveor3c@codemonkey.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170410234830.tmqdhpjtfdveor3c@codemonkey.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: 860 Lines: 21 On Mon, Apr 10, 2017 at 07:48:30PM -0400, Dave Jones wrote: > > if (WARN_ON(pipe->nr_bufs)) > > printk(KERN_ERR "->splice_write = %p", > > sd->u.file->f_op->splice_write); > > and see which function it is? > > s/nr_bufs/nrbufs/ aside, I tried this, and it didn't trigger, even > though I hit the iov_iter_pipe WARN again. Huh? So you have WARN_ON(pipe->nrbufs == pipe->buffers) trigger depite WARN_ON(pipe->nrbufs) *not* triggering a bit earlier? Nuts... Let's do this: * in generic_file_splice_read(): WARN_ON(pipe->nrbufs == pipe->buffers) *and* WARN_ON(!pipe->buffers) in the very beginning. * in do_splice_to(): ditto. * in splice_direct_to_actor(): if (WARN_ON... from upthread (with the typo fix, of course). * in iov_iter_pipe() turn the test into if (WARN_ON(pipe->nrbufs == pipe->buffers)) WARN_ON(pipe != current->splice_pipe);