Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933997AbbG1KaY (ORCPT ); Tue, 28 Jul 2015 06:30:24 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:44366 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932841AbbG1KaS (ORCPT ); Tue, 28 Jul 2015 06:30:18 -0400 X-AuditID: cbfee61a-f79a06d000005c6f-b4-55b759b80ea6 From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <1437870077-46892-1-git-send-email-jaegeuk@kernel.org> In-reply-to: <1437870077-46892-1-git-send-email-jaegeuk@kernel.org> Subject: RE: [f2fs-dev] [PATCH 1/2] f2fs: call set_page_dirty to attach i_wb for cgroup Date: Tue, 28 Jul 2015 18:29:38 +0800 Message-id: <00e501d0c920$68398180$38ac8480$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQIpV6pP3uJp8GhJxVQThoJEA1KeQJ0/kGwQ Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsVy+t9jAd0dkdtDDTpPSFk8WT+L2eLSIneL PXtPslhc3jWHzYHFY9OqTjaP3Qs+M3l83iQXwBzFZZOSmpNZllqkb5fAlfFq+UzWgskyFbev /mZvYHwt3sXIySEhYCJxYdlTJghbTOLCvfVsXYxcHEICSxkljux8BuW8YpQ4OmsdC0gVm4CK xPKO/2AdIgJqEr37poDZzAKZEhP6X7B3MXIANThJ3HylDRLmFHCWuPvxBjOILSwQKbHtRSuY zSKgKjH58h9WEJtXwFJiw7v5zBC2oMSPyfdYIEZqSazfeRxqvLzE5jVvmSEOVZDYcfY1I8QJ RhLn209A1YtLbDxyi2UCo9AsJKNmIRk1C8moWUhaFjCyrGKUSC1ILihOSs81zEst1ytOzC0u zUvXS87P3cQIDv9nUjsYD+5yP8QowMGoxMM7Yd22UCHWxLLiytxDjBIczEoivH8Mt4cK8aYk VlalFuXHF5XmpBYfYpTmYFES55XdsDlUSCA9sSQ1OzW1ILUIJsvEwSnVwFg6y0P6tm37HtGK jH+TLHUeVzkcN5Y2DTdUO+g7/ZqLismzfTwFzYK8S//sNNZa/nXCOoN5uYYJp/n/W0Z3Pzo/ z4KV90OzRp1AuX6j54/GxInzH/09suOGTZVqk3zga3PfMwGsayROey3LXGbIuGqfSqsKw0pP +Wkz1I17L61pbJ+aLPSqXImlOCPRUIu5qDgRAFJE41N7AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3769 Lines: 84 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Sunday, July 26, 2015 8:21 AM > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Jaegeuk Kim > Subject: [f2fs-dev] [PATCH 1/2] f2fs: call set_page_dirty to attach i_wb for cgroup > > The cgroup attaches inode->i_wb via mark_inode_dirty and when set_page_writeback > is called, __inc_wb_stat() updates i_wb's stat. > > So, we need to explicitly call set_page_dirty->__mark_inode_dirty in prior to > any writebacking pages. > > This patch should resolve the following kernel panic reported by Andreas Reis. > > https://bugzilla.kernel.org/show_bug.cgi?id=101801 > > --- Comment #2 from Andreas Reis --- > BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8 > IP: [] __percpu_counter_add+0x1a/0x90 > PGD 2951ff067 PUD 2df43f067 PMD 0 > Oops: 0000 [#1] PREEMPT SMP > Modules linked in: > CPU: 7 PID: 10356 Comm: gcc Tainted: G W 4.2.0-1-cu #1 > Hardware name: Gigabyte Technology Co., Ltd. G1.Sniper M5/G1.Sniper M5, BIOS > T01 02/03/2015 > task: ffff880295044f80 ti: ffff880295140000 task.ti: ffff880295140000 > RIP: 0010:[] [] > __percpu_counter_add+0x1a/0x90 > RSP: 0018:ffff880295143ac8 EFLAGS: 00010082 > RAX: 0000000000000003 RBX: ffffea000a526d40 RCX: 0000000000000001 > RDX: 0000000000000020 RSI: 0000000000000001 RDI: 0000000000000088 > RBP: ffff880295143ae8 R08: 0000000000000000 R09: ffff88008f69bb30 > R10: 00000000fffffffa R11: 0000000000000000 R12: 0000000000000088 > R13: 0000000000000001 R14: ffff88041d099000 R15: ffff880084a205d0 > FS: 00007f8549374700(0000) GS:ffff88042f3c0000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00000000000000a8 CR3: 000000033e1d5000 CR4: 00000000001406e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Stack: > 0000000000000000 ffffea000a526d40 ffff880084a20738 ffff880084a20750 > ffff880295143b48 ffffffff811cc91e ffff880000000000 0000000000000296 > 0000000000000000 ffff880417090198 0000000000000000 ffffea000a526d40 > Call Trace: > [] __test_set_page_writeback+0xde/0x1d0 > [] do_write_data_page+0xe7/0x3a0 > [] gc_data_segment+0x5aa/0x640 > [] do_garbage_collect+0x138/0x150 > [] f2fs_gc+0x1be/0x3e0 > [] f2fs_balance_fs+0x81/0x90 > [] f2fs_unlink+0x47/0x1d0 > [] vfs_unlink+0x109/0x1b0 > [] do_unlinkat+0x287/0x2c0 > [] SyS_unlink+0x16/0x20 > [] entry_SYSCALL_64_fastpath+0x12/0x71 > Code: 41 5e 5d c3 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 55 49 > 89 f5 41 54 49 89 fc 53 48 83 ec 08 65 ff 05 e6 d9 b6 7e <48> 8b 47 20 48 63 ca > 65 8b 18 48 63 db 48 01 f3 48 39 cb 7d 0a > RIP [] __percpu_counter_add+0x1a/0x90 > RSP > CR2: 00000000000000a8 > ---[ end trace 5132449a58ed93a3 ]--- > note: gcc[10356] exited with preempt_count 2 > > Signed-off-by: Jaegeuk Kim Good catch! Reviewed-by: Chao Yu BTW, is this commit facd126d961d ("f2fs: fix wrong f2fs_put_page call for an error case") be submitted incorrectly? it seems not a good fix. Thanks, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/