From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757847AbXFLBzI (ORCPT ); Mon, 11 Jun 2007 21:55:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757159AbXFLByv (ORCPT ); Mon, 11 Jun 2007 21:54:51 -0400 Received: from smtp108.mail.mud.yahoo.com ([209.191.85.218]:44943 "HELO smtp108.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756915AbXFLBys (ORCPT ); Mon, 11 Jun 2007 21:54:48 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type; b=mxYVULvoCsvd+xStM1hfDpTiB4pv/tRYi/p75uN4lrHgPE8+4P5/Z0oeyN8s20+cogYkCbYg53NGKtGOICi3E4xD0wnJrpWeu7sayIsoqFTklJkKhbkyrkjdl6GFEgd2NtfTaJ/FDJBLUg3rmTlR6yrxIfg9yF4ZMXi1TXvc+QU= ; X-YMail-OSG: d5IZaTkVM1macCim6oY5CKLCyZxFPLEVdak9Y4PZNhaHGiQjrL0csQJh0DOWHLvQQ574PhedLA-- Message-ID: <466DFCE2.8070504@yahoo.com.au> Date: Tue, 12 Jun 2007 11:54:42 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 X-Accept-Language: en MIME-Version: 1.0 To: Andrew Morton CC: Eric Sesterhenn / Snakebyte , linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [BUG] fs/buffer.c:1821 in 2.6.22-rc4-mm2 References: <20070610155714.GA21592@alice> <20070611005529.422d1678.akpm@linux-foundation.org> In-Reply-To: <20070611005529.422d1678.akpm@linux-foundation.org> Content-Type: multipart/mixed; boundary="------------090307080900080602090300" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------090307080900080602090300 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Andrew Morton wrote: > On Sun, 10 Jun 2007 17:57:14 +0200 Eric Sesterhenn / Snakebyte wrote: > > >>hi, >> >>i got the following BUG while running the syscalls.sh >>from ltp-full-20070531 on an ext3 partition, it is easily reproducible >>for me >> >>[ 476.338068] ------------[ cut here ]------------ >>[ 476.338223] kernel BUG at fs/buffer.c:1821! >>[ 476.338324] invalid opcode: 0000 [#1] >>[ 476.338423] PREEMPT >>[ 476.338665] Modules linked in: >>[ 476.338833] CPU: 0 >>[ 476.338836] EIP: 0060:[] Not tainted VLI >>[ 476.338840] EFLAGS: 00010202 (2.6.22-rc4-mm2 #1) >>[ 476.339206] EIP is at __block_prepare_write+0x64/0x410 >>[ 476.339311] eax: 00000001 ebx: c136fbb8 ecx: c07faf28 edx: >>00000001 >>[ 476.339417] esi: c1dc9040 edi: c32d2dfc ebp: c3733db8 esp: >>c3733d50 >>[ 476.339584] ds: 007b es: 007b fs: 0000 gs: 0033 ss: 0068 >>[ 476.339690] Process vmsplice01 (pid: 7680, ti=c3733000 task=c351ed60 >>task.ti=c3733000) >>[ 476.339796] Stack: c3733d70 c0143e76 c1a0eab0 00000046 00000000 >>c2509d64 00000cd8 c136fbb8 >>[ 476.340675] c32d2dfc 00000296 c02313b6 c1086088 00000050 >>c02313b6 c1dc9040 c2509d50 >>[ 476.341491] c1dc9054 c3733dc4 c02313e9 c3733dbc c015728d >>c32d2f0c 00000000 c136fbb8 >>[ 476.342371] Call Trace: >>[ 476.342565] [] block_write_begin+0x83/0xf0 >>[ 476.342804] [] ext3_write_begin+0xc8/0x1c0 >>[ 476.342987] [] pagecache_write_begin+0x4f/0x150 >>[ 476.343243] [] pipe_to_file+0x9b/0x170 >>[ 476.343418] [] __splice_from_pipe+0x70/0x260 >>[ 476.343654] [] splice_from_pipe+0x48/0x70 >>[ 476.343828] [] generic_file_splice_write+0x88/0x130 >>[ 476.344066] [] do_splice_from+0xb7/0xc0 >>[ 476.344240] [] sys_splice+0x1a1/0x230 >>[ 476.344474] [] sysenter_past_esp+0x5f/0x99 >>[ 476.344656] [] 0xffffe410 >>[ 476.344882] ======================= >>[ 476.344984] INFO: lockdep is turned off. >>[ 476.345084] Code: 00 0f 97 c2 e8 ee 2f 22 00 85 c0 74 04 0f 0b eb fe >>31 d2 b8 28 af 7f c0 81 7d 08 00 10 00 00 0f 97 c2 e8 d0 2f 22 00 85 c0 >>74 04 <0f> 0b eb fe 8b 55 08 39 55 b0 0f 97 c0 0f b6 d0 b8 0c af 7f c0 >>[ 476.350365] EIP: [] __block_prepare_write+0x64/0x410 SS:ESP >>0068:c3733d50 > > > Yep, vmsplice01 is not supported on -mm kernels ;) > > Nick has a protofix but I don't think it's been tested yet. Yeah, sorry I didn't catch that after you merged :P This should be the correct bugfix attached -- it is just a typo. -- SUSE Labs, Novell Inc. --------------090307080900080602090300 Content-Type: text/plain; name="fs-new-write-aops-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fs-new-write-aops-fix.patch" Index: linux-2.6/fs/splice.c =================================================================== --- linux-2.6.orig/fs/splice.c +++ linux-2.6/fs/splice.c @@ -570,7 +570,7 @@ static int pipe_to_file(struct pipe_inod if (this_len + offset > PAGE_CACHE_SIZE) this_len = PAGE_CACHE_SIZE - offset; - ret = pagecache_write_begin(file, mapping, sd->pos, sd->len, + ret = pagecache_write_begin(file, mapping, sd->pos, this_len, AOP_FLAG_UNINTERRUPTIBLE, &page, &fsdata); if (unlikely(ret)) goto out; @@ -583,11 +583,12 @@ static int pipe_to_file(struct pipe_inod char *dst = kmap_atomic(page, KM_USER1); memcpy(dst + offset, src + buf->offset, this_len); + flush_dcache_page(page); kunmap_atomic(dst, KM_USER1); buf->ops->unmap(pipe, buf, src); } - ret = pagecache_write_end(file, mapping, sd->pos, sd->len, sd->len, page, fsdata); + ret = pagecache_write_end(file, mapping, sd->pos, this_len, this_len, page, fsdata); out: --------------090307080900080602090300--