Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbdCBTqG (ORCPT ); Thu, 2 Mar 2017 14:46:06 -0500 Received: from mail-ua0-f172.google.com ([209.85.217.172]:35790 "EHLO mail-ua0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbdCBTqD (ORCPT ); Thu, 2 Mar 2017 14:46:03 -0500 MIME-Version: 1.0 From: Dmitry Vyukov Date: Thu, 2 Mar 2017 20:15:19 +0100 Message-ID: Subject: cgroup: WARNING in cgroup_kill_sb To: Tejun Heo , Zefan Li , "Eric W. Biederman" , jweiner@fb.com, LKML , Al Viro , "linux-fsdevel@vger.kernel.org" Cc: syzkaller Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1980 Lines: 41 Hello, The following program triggers WARNING in cgroup_kill_sb: https://gist.githubusercontent.com/dvyukov/47a37d3b899ece1f57e512dc6c90bca6/raw/250894f3d6e2954eed01bac39e4c3b7ec59a9c31/gistfile1.txt WARNING: CPU: 2 PID: 3092 at lib/percpu-refcount.c:317 percpu_ref_kill_and_confirm+0x3ff/0x4f0 lib/percpu-refcount.c:316 percpu_ref_kill_and_confirm called more than once on css_release! Kernel panic - not syncing: panic_on_warn set ... CPU: 2 PID: 3092 Comm: a.out Not tainted 4.10.0+ #260 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51 panic+0x1fb/0x412 kernel/panic.c:179 __warn+0x1c4/0x1e0 kernel/panic.c:540 warn_slowpath_fmt+0xc5/0x100 kernel/panic.c:563 percpu_ref_kill_and_confirm+0x3ff/0x4f0 lib/percpu-refcount.c:316 percpu_ref_kill include/linux/percpu-refcount.h:119 [inline] cgroup_kill_sb+0x188/0x530 kernel/cgroup/cgroup.c:1833 deactivate_locked_super+0x88/0xd0 fs/super.c:309 deactivate_super+0x155/0x1b0 fs/super.c:340 cleanup_mnt+0xb2/0x160 fs/namespace.c:1112 __cleanup_mnt+0x16/0x20 fs/namespace.c:1119 task_work_run+0x18a/0x260 kernel/task_work.c:116 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x23b/0x2a0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x4d3/0x570 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xc0/0xc2 RIP: 0033:0x440b39 RSP: 002b:00007f3e8bd0cdb8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffec RBX: 0000000000000000 RCX: 0000000000440b39 RDX: 00000000004a0f3b RSI: 00000000004a0f34 RDI: 00000000004a0f34 RBP: 00007f3e8bd0cdd0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000202 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3e8bd0d9c0 R15: 00007f3e8bd0d700 On commit 4977ab6e92e267afe9d8f78438c3db330ca8434c