Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1643644
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Tejun Heo <tj@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once |
| Date | Wed, 17 May 2017 23:40:01 +0200 |
| Message-ID | <tIePL-8wt-13@gated-at.bofh.it> (permalink) |
| References | <tHoo9-lZ-3@gated-at.bofh.it> <tHoob-lZ-51@gated-at.bofh.it> <tIcNY-7cM-13@gated-at.bofh.it> <tIdK1-7Nc-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tdk93+L8Qvv/fUm/oUmN9BVpi13RjOCkfRpRMF6SP3g=; b=fRUjp8nFmmYnGDOZXSMpUuDGPEftJBCrMBewXxRmh9RcHNSGRCms3wrW0j5XGvMqKz Sr9yq4xO0iWVwrUAS6+QK/OMmZ/3U+B4TCc6GthhzBM+oUYwRCuCLLYmdKIVrvGwrwr3 o/zDaTzpV0p14g+s79EQq9Ovd7A1MdMN2f+X9dgHUzS2CSogztAhiaXP0bq7Xwy3Lob4 vLZyF4/GoQBOBZG03mRA4CO6yF9pYWv0mNb1RVbIZZ5Edg+1Ynds+uUyw/5zSLGhQL8x IwjnfPfjRkZ/upIFSdaPWtqcsCTjySmSFmIcBPsoZxDYIlc6bI2oaOSrLt77912Etip5 32FQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tdk93+L8Qvv/fUm/oUmN9BVpi13RjOCkfRpRMF6SP3g=; b=nn24KXe6FjTlYvpONyK1g+kOBt0ENBvukVg8o1Ag2Zp0odTlHISWI4e22va1ixuE9y bWF5Lz6X7hwY3ysAf4XbKrcLszrfwiTCCkCbh1Xb1SP0PSqWEBaE5kuzHe1/qeJIuIVE 7mQLzXg0/UNJldC0lk0Xa/Opa2FTcMr+m86+8nMrL+jTQBwSEP8gEZGJ2q6TGXsWseBj NLt6WsWGp3Z0eIZvV2ARtAdd+nHXo1d4+FIxheRiUFaUa6KiC2EOellCju/l2HPVHZ7I Oitci197k0WKtcpSrYzhnHlkQNVm8fUDTDz2/kshKR8Nnp4av4LUzqukowEGPoOmLRLx Vmtw== |
| X-Gm-Message-State | AODbwcAKL0c2azT/QbwJriwoDW07T3UFs3oY4fUPi15KJHZet5FUgpuY emKxkeHJ7cVWWg== |
| X-Received | by 10.176.91.20 with SMTP id u20mr135895uae.138.1495056850032; Wed, 17 May 2017 14:34:10 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.8.2 (2017-04-18) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 61 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Li Zefan <lizefan@huawei.com>, Johannes Weiner <hannes@cmpxchg.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de |
| X-Original-Date | Wed, 17 May 2017 17:34:07 -0400 |
| X-Original-Message-ID | <20170517213407.GD942@htj.duckdns.org> |
| X-Original-References | <1494855256-12558-1-git-send-email-longman@redhat.com> <1494855256-12558-8-git-send-email-longman@redhat.com> <20170517192357.GC942@htj.duckdns.org> <c541638f-b302-8c96-0dcd-f4b758a4a81f@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1643644 |
Show key headers only | View raw
On Wed, May 17, 2017 at 04:24:32PM -0400, Waiman Long wrote: > On 05/17/2017 03:23 PM, Tejun Heo wrote: > > Hello, > > > > On Mon, May 15, 2017 at 09:34:06AM -0400, Waiman Long wrote: > >> The kill_css() function may be called more than once under the condition > >> that the css was killed but not physically removed yet followed by the > >> removal of the cgroup that is hosting the css. This patch prevents any > >> harmm from being done when that happens. > >> > >> Signed-off-by: Waiman Long <longman@redhat.com> > > So, this is a bug fix which isn't really related to this patchset. > > I'm applying it to cgroup/for-4.12-fixes w/ stable cc'd. > > > > Thanks. > > > Actually, this bug can be easily triggered with the resource domain > patch later in the series. I guess it can also happen in the current > code base, but I don't have a test that can reproduce it. I can reproduce it easily. [test /sys/fs/cgroup/asdf]# while true; do mkdir asdf; echo +memory > cgroup.subtree_control; echo -memory [ 66.159258] percpu_ref_kill_and_confirm called more than once on css_release! [ 66.159293] ------------[ cut here ]------------ [ 66.160966] WARNING: CPU: 1 PID: 1802 at lib/percpu-refcount.c:334 percpu_ref_kill_and_confirm+0x190/0x1a0 [ 66.162406] Modules linked in: [ 66.162686] CPU: 1 PID: 1802 Comm: rmdir Not tainted 4.12.0-rc1-work+ #42 [ 66.163279] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc26 04/01/2014 [ 66.164043] task: ffff880018240040 task.stack: ffffc90000478000 [ 66.164571] RIP: 0010:percpu_ref_kill_and_confirm+0x190/0x1a0 [ 66.165106] RSP: 0018:ffffc9000047bde8 EFLAGS: 00010092 [ 66.165664] RAX: 0000000000000041 RBX: ffff88001a0fc148 RCX: 0000000000000002 [ 66.166443] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff810acc2e [ 66.167083] RBP: ffffc9000047be00 R08: 0000000000000000 R09: 0000000000000001 [ 66.167696] R10: ffffc9000047bd50 R11: 0000000000000000 R12: 0000000000000286 [ 66.168293] R13: ffffffff810e7c50 R14: ffff88001a106bb8 R15: 0000000000000000 [ 66.168897] FS: 00007fba87594700(0000) GS:ffff88001fc80000(0000) knlGS:0000000000000000 [ 66.169613] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 66.170204] CR2: 000056167ee4e008 CR3: 000000001820e000 CR4: 00000000000006a0 [ 66.170861] Call Trace: [ 66.171075] kill_css+0x3e/0x170 [ 66.171352] cgroup_destroy_locked+0xac/0x170 [ 66.171732] cgroup_rmdir+0x2c/0x150 [ 66.172037] kernfs_iop_rmdir+0x48/0x70 [ 66.172377] vfs_rmdir+0x73/0x150 [ 66.172679] do_rmdir+0x16d/0x1c0 [ 66.172962] SyS_rmdir+0x16/0x20 [ 66.173244] entry_SYSCALL_64_fastpath+0x18/0xad [ 66.173682] RIP: 0033:0x7fba870c1487 [ 66.173985] RSP: 002b:00007ffec57e43a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 [ 66.174719] RAX: ffffffffffffffda RBX: 00007fba87388b38 RCX: 00007fba870c1487 [ 66.175439] RDX: 00007fba8738ae80 RSI: 0000000000000000 RDI: 00007ffec57e5751 [ 66.176281] RBP: 00007fba87388ae0 R08: 0000000000000000 R09: 0000000000000000 [ 66.177046] R10: 000056167ee4e010 R11: 0000000000000246 R12: 00007fba87388b38 [ 66.177821] R13: 0000000000000030 R14: 00007fba87388b58 R15: 0000000000002710 [ 66.178574] Code: 80 3d f5 d3 89 00 00 0f 85 b8 fe ff ff 48 8b 53 10 48 c7 c6 e0 c0 83 81 48 c7 c7 68 e0 9c 81 c6 05 d6 d3 89 00 01 e8 09 0a d4 ff <0f> ff 48 8b 43 08 e9 8f fe ff ff 0f 1f 44 00 00 55 ba ff ffff [ 66.181059] ---[ end trace 50ce5cd95cda7a2c ]--- -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once Waiman Long <longman@redhat.com> - 2017-05-15 15:40 +0200
Re: [RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once Tejun Heo <tj@kernel.org> - 2017-05-17 21:30 +0200
Re: [RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once Waiman Long <longman@redhat.com> - 2017-05-17 22:30 +0200
Re: [RFC PATCH v2 07/17] cgroup: Prevent kill_css() from being called more than once Tejun Heo <tj@kernel.org> - 2017-05-17 23:40 +0200
csiph-web