Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbdDKWZH (ORCPT ); Tue, 11 Apr 2017 18:25:07 -0400 Received: from scorn.kernelslacker.org ([45.56.101.199]:39540 "EHLO scorn.kernelslacker.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbdDKWZF (ORCPT ); Tue, 11 Apr 2017 18:25:05 -0400 Date: Tue, 11 Apr 2017 18:25:02 -0400 From: Dave Jones To: Al Viro Cc: Linux Kernel Subject: Re: iov_iter_pipe warning. Message-ID: <20170411222502.ldgahltwvrrxdbbw@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Al Viro , Linux Kernel 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> <20170411002215.GE29622@ZenIV.linux.org.uk> <20170411030532.vcam25fz6224ny2h@codemonkey.org.uk> <20170411032839.GF29622@ZenIV.linux.org.uk> <20170411205336.uyz5vfw52twhh6ob@codemonkey.org.uk> <20170411211216.GH29622@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170411211216.GH29622@ZenIV.linux.org.uk> User-Agent: NeoMutt/20170306 (1.8.0) X-Spam-Note: SpamAssassin invocation failed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2164 Lines: 51 On Tue, Apr 11, 2017 at 10:12:16PM +0100, Al Viro wrote: > On Tue, Apr 11, 2017 at 04:53:36PM -0400, Dave Jones wrote: > > > if (WARN_ON(pipe->nrbufs)) { > > > printk(KERN_ERR "->splice_write = %p", > > > sd->u.file->f_op->splice_write); > > > } > > > } > > > > Ah, missed adding this 2nd WARN_ON. > > Good - it means that we don't have to chase memory corruption yet. That > smells like some ->splice_write() claiming it has copied more than it > has drained from the pipe. > > > I'll turn it back off, and retry with the missing WARN from above added. > > Please, do. And it would be nice if you printed sd->u.file->f_op as well > (in the same printk). Will add that for the next run. In the meantime.. [ 2675.049082] WARNING: CPU: 0 PID: 10149 at fs/splice.c:1020 splice_direct_to_actor+0x20c/0x2b0 [ 2675.061581] CPU: 0 PID: 10149 Comm: trinity-c2 Not tainted 4.11.0-rc6-think+ #6 [ 2675.086528] Call Trace: [ 2675.098901] dump_stack+0x68/0x93 [ 2675.111242] __warn+0xcb/0xf0 [ 2675.123467] warn_slowpath_null+0x1d/0x20 [ 2675.135602] splice_direct_to_actor+0x20c/0x2b0 [ 2675.147636] ? generic_pipe_buf_nosteal+0x10/0x10 [ 2675.159675] do_splice_direct+0x9e/0xd0 [ 2675.171837] do_sendfile+0x1d7/0x3c0 [ 2675.183762] SyS_sendfile64+0x73/0xe0 [ 2675.195944] do_syscall_64+0x66/0x1d0 [ 2675.208090] entry_SYSCALL64_slow_path+0x25/0x25 [ 2675.220256] RIP: 0033:0x7fcf6cdb80f9 [ 2675.232338] RSP: 002b:00007fff12252418 EFLAGS: 00000246 [ 2675.244447] ORIG_RAX: 0000000000000028 [ 2675.256474] RAX: ffffffffffffffda RBX: 0000000000000028 RCX: 00007fcf6cdb80f9 [ 2675.268528] RDX: 00007fcf6af23000 RSI: 0000000000000187 RDI: 0000000000000158 [ 2675.280680] RBP: 00007fcf6d479000 R08: 9696969696969696 R09: adadadadadadadad [ 2675.292870] R10: 0000000000000508 R11: 0000000000000246 R12: 0000000000000002 [ 2675.305049] R13: 00007fcf6d479048 R14: 00007fcf6d48ead8 R15: 00007fcf6d479000 [ 2675.317455] ---[ end trace 9e4e62cfabcb9081 ]--- [ 2675.329626] ->splice_write = ffffffff812b3130 $ grep ffffffff812b3130 /proc/kallsyms ffffffff812b3130 T generic_splice_sendpage This one spat out all by itself. Dave