From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: [Patch 3.14 stable 00/16] vfs: fix dentry shrink list corruption Date: Thu, 6 Nov 2014 11:37:04 -0800 Message-ID: <1415302640-5876-1-git-send-email-xiyou.wangcong@gmail.com> Cc: viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org, Cong Wang To: stable@vger.kernel.org Return-path: Sender: stable-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On at least 3 different machines, we have seen dentry shrink list corruption with 3.14 stable kernel (see the end of this email), which I think is fixed by a set of patches from Al. This bug is probably introduced by the following commit in 3.12: commit dd1f6b2e43a53ee58eb87d5e623cf44e277d005d Author: Dave Chinner Date: Wed Aug 28 10:17:55 2013 +1000 dcache: remove dentries from LRU before putting on dispose list since previously we held the per sb lock. It is hard to reproduce this bug, because it is a race condition which happens when we update two contiguous dentries on a shrink list. Matt ran some ltp stress tests and doesn't see any problem with the patched kernel. And, 3.13 needs them too, but we have no time or resource to backport or test them on 3.13. The first 7 patches are the original patchset from Al, the rest of patches are either needed for context or are folllow-up fixes, especially the last 2 patches. Of course all of them are merged in upstream, see each patch for details. Note, I don't get any conflict when backporting them to 3.14. Signed-off-by: Cong Wang Tested-by: Matthew Mullins -------------> [45204.957357] ------------[ cut here ]------------ [45204.957370] WARNING: CPU: 6 PID: 26375 at lib/list_debug.c:33 __list_add+0x63/0xa7() [45204.957373] list_add corruption. prev->next should be next (ffff880c0205d280), but was ffff880cfa3d9d00. (prev=ffff8807c5ad7c08). [45204.957375] Modules linked in: cls_basic act_mirred cls_u32 veth sch_ingress netconsole configfs ipv6 dm_multipath scsi_dh video sbs sbshc acpi_p ad acpi_ipmi parport_pc lp parport tcp_diag inet_diag ipmi_devintf sg iTCO_wdt iTCO_vendor_support dcdbas igb i2c_algo_bit ptp pps_core wmi ipmi_si sb_edac hed edac_core ipmi_msghandler i2c_i801 ioatdma i2c_core microcode lpc_ich mfd_core dca shpchp ahci libahci libata sd_mod scsi_mod [45204.957421] CPU: 6 PID: 26375 Comm: python2.6 Not tainted 3.14.14 #1 [45204.957423] Hardware name: Dell Inc. PowerEdge C6220/03C9JJ, BIOS 1.2.1 05/27/2013 [45204.957426] 0000000000000000 ffff8807c5ad7ad0 ffffffff814a9b67 ffff8807c5ad7b18 [45204.957453] ffff8807c5ad7b08 ffffffff8105b901 ffffffff812787ff ffff8807c5ad7c08 [45204.957459] ffff880c0205d280 ffff880be8bbc8c0 ffff880850fd3680 ffff8807c5ad7b68 [45204.957465] Call Trace: [45204.957475] [] dump_stack+0x45/0x56 [45204.957482] [] warn_slowpath_common+0x7f/0x98 [45204.957486] [] ? __list_add+0x63/0xa7 [45204.957490] [] warn_slowpath_fmt+0x4c/0x4e [45204.957494] [] __list_add+0x63/0xa7 [45204.957500] [] list_add+0xc/0xe [45204.957504] [] d_shrink_add+0x4a/0x5e [45204.957509] [] shrink_dentry_list+0xaa/0xbb [45204.957513] [] shrink_dcache_parent+0x50/0x60 [45204.957520] [] proc_flush_task+0x14c/0x18b [45204.957526] [] release_task+0x30/0x36d [45204.957530] [] do_exit+0x809/0x8ee [45204.957537] [] ? __unqueue_futex+0x53/0x56 [45204.957541] [] do_group_exit+0x44/0x9a [45204.957548] [] get_signal_to_deliver+0x44b/0x4bc [45204.957555] [] do_signal+0x49/0x5d5 [45204.957561] [] ? kmem_cache_free+0x100/0x138 [45204.957565] [] ? __mmdrop+0x82/0x89 [45204.957570] [] do_notify_resume+0x29/0x65 [45204.957576] [] int_signal+0x12/0x17 [45204.957579] ---[ end trace 0decfbe793859fa2 ]--- [45204.959359] ------------[ cut here ]------------