Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935553AbdCXDTg (ORCPT ); Thu, 23 Mar 2017 23:19:36 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4393 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S935496AbdCXDS6 (ORCPT ); Thu, 23 Mar 2017 23:18:58 -0400 Subject: Re: lib, fs, cgroup: WARNING in percpu_ref_kill_and_confirm To: Dmitry Vyukov , Tejun Heo , , LKML , "Eric W. Biederman" , , Andrew Morton References: CC: syzkaller From: Zefan Li Message-ID: <58D48FFD.80903@huawei.com> Date: Fri, 24 Mar 2017 11:18:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.58D49010.004C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6cd36a503169cf3edf775cb8fefd60a3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2177 Lines: 45 On 2017/3/23 22:04, Dmitry Vyukov wrote: > Hello, > > The following program triggers WARNING in percpu_ref_kill_and_confirm: > https://gist.githubusercontent.com/dvyukov/bcfcef3d6b24b9fd841b88ee20c14d4b/raw/a54aeeb09ad1e0659b0ed87ef5efc4480ab2536f/gistfile1.txt > The bug can be triggered immediately. I'll look into it. Thanks! > ------------[ cut here ]------------ > WARNING: CPU: 3 PID: 19987 at lib/percpu-refcount.c:317 > percpu_ref_kill_and_confirm+0x303/0x3c0 lib/percpu-refcount.c:316 > percpu_ref_kill_and_confirm called more than once on css_release! > CPU: 3 PID: 19987 Comm: a.out Not tainted 4.11.0-rc3+ #365 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:16 [inline] > dump_stack+0x1b8/0x28d lib/dump_stack.c:52 > panic+0x20c/0x423 kernel/panic.c:180 > __warn+0x1c4/0x1e0 kernel/panic.c:541 > warn_slowpath_fmt+0xc1/0x100 kernel/panic.c:564 > percpu_ref_kill_and_confirm+0x303/0x3c0 lib/percpu-refcount.c:316 > percpu_ref_kill include/linux/percpu-refcount.h:119 [inline] > cgroup_kill_sb+0x31d/0x480 kernel/cgroup/cgroup.c:1834 > deactivate_locked_super+0x99/0xe0 fs/super.c:309 > deactivate_super+0x151/0x160 fs/super.c:340 > cleanup_mnt+0xb2/0x160 fs/namespace.c:1115 > __cleanup_mnt+0x16/0x20 fs/namespace.c:1122 > task_work_run+0x1a4/0x270 kernel/task_work.c:116 > tracehook_notify_resume include/linux/tracehook.h:191 [inline] > exit_to_usermode_loop+0x24d/0x2d0 arch/x86/entry/common.c:161 > prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] > syscall_return_slowpath+0x3bd/0x460 arch/x86/entry/common.c:260 > entry_SYSCALL_64_fastpath+0xc0/0xc2 > RIP: 0033:0x443129 > RSP: 002b:00007ffe06080018 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 > RAX: ffffffffffffffec RBX: 00000000004002b0 RCX: 0000000000443129 > RDX: 000000002019cff9 RSI: 000000002000c000 RDI: 00000000204ff000 > RBP: 00007ffe06080060 R08: 00000000201db000 R09: 0000000000000000 > R10: 000000000000c084 R11: 0000000000000202 R12: 0000000000000000 > R13: 00000000004025b0 R14: 0000000000402640 R15: 0000000000000000 > > On commit 093b995e3b55a0ae0670226ddfcb05bfbf0099ae > . >