Received: by 10.223.164.202 with SMTP id h10csp961149wrb; Tue, 7 Nov 2017 18:32:13 -0800 (PST) X-Google-Smtp-Source: ABhQp+RgEXx9Gvqf/BbqCNYKKnKJdVMxE1EpWh7/3oGoDJk8FS0bujtQqsDx0vVan5gMLa1XgVfk X-Received: by 10.99.47.6 with SMTP id v6mr743728pgv.452.1510108333779; Tue, 07 Nov 2017 18:32:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510108333; cv=none; d=google.com; s=arc-20160816; b=wz/vR4TLhO0GH4N2XO2WceYLW8xJYV8ya+EPvmBPljCGFjyE0Awz/lsIK2YsRIbpX8 PyTQ6dWdD/zGydxPwCAgH2pO182FuEb/emZOffNz/K8tq6kS2+QG+DQ5dIeXJEte2AJM MYBk8Zc0Cn5F5l2wDuFkWpGQVPSQBIlfdOzJF2c1BxRI4FwAcf3/LQVT6P6EZzRZdR5K kseOHdNtNXFyZSJFgFpZcPURm+Ei13es8fdGYBeYZ6Ch7GbXqIc4bSYsXS5LCNDEIsYQ I8FWR/1XtK4nayGulcufmOTneLJ/xNeNsjTM7tIPB10AjPeYalRoJBrIqagc0dSfXZoU DYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=tFVh4+F80DrRiwtXj348S4aywS6kBi3F/wRnEum3WOE=; b=ctFxiLKNGdE4QOHRHTQcrpliPb3v6/GPpPE2TMD+Sj0OwXMBbGoAxTDT/vZds7Un8v uwyeTSQJ9zz6AWq9dzm7vufJjKFbJJi5yP9CEITqG0YJtjdBRslOfc6CJfX4L+4P86O3 qL2qno6Bjr/DPthJkVRLHo0RoRt+UEVtq5uoPbdUu7Bh5Vr/cDN7sfAe4X1+R4LZABGa 2wFhSEs/TMwrY9vreTsbLeKtK+nfku78AsZjIkgD1/nPecFOqDbp7ealoUdWBG8sLKdS Z/PTX/YdzecywBnlEUJ0Jd5Ke6/KBxaPT9iWgdnrMmwFC48ERynBzr64jBZl2TFnC/O0 nrNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JmhAFa7V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f130si1533551pgc.536.2017.11.07.18.32.01; Tue, 07 Nov 2017 18:32:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JmhAFa7V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757414AbdKGTdB (ORCPT + 90 others); Tue, 7 Nov 2017 14:33:01 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:49461 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbdKGTdA (ORCPT ); Tue, 7 Nov 2017 14:33:00 -0500 Received: by mail-qt0-f195.google.com with SMTP id k31so452718qta.6 for ; Tue, 07 Nov 2017 11:33:00 -0800 (PST) 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=tFVh4+F80DrRiwtXj348S4aywS6kBi3F/wRnEum3WOE=; b=JmhAFa7V4wW72GpvYXmBuQrn6qsOrBL83QWeVeepOZcNAxGFmtTRr6dscGH8sBInHI inTJYwlLuA6gsG2o3MZzhNCUQORZVI54zTtM8PML0syBUU5mnStNpG7DLG3b8TgO4d5n upgIircTElNfS+leo2rsHYnt58PqjVEiNQ3UDfLRJ0v7a0Nxer29tnZYQCuXUGhwdrbh 7MknY3nEoDMSwO6IcbRiWhgmHIl70liuFKBpphSvvqwtB0IJl0duxFmDU9L/ajDCG+gr jrpbFVUZ4MQ2n7iynCMbt/af4tH6VwgvWWS5JrZJkaMOWVMpvc7AJyTKzsPEUNGyQMdv 1y6g== 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=tFVh4+F80DrRiwtXj348S4aywS6kBi3F/wRnEum3WOE=; b=lMuBUvQ1G+K5/++fzH7tgLW7IZ4R+aBvL+Q073+GwwVeKT60mu9/zzhG+saiTW5Lbb bD4xiKFD0nZfVdXRpPAYJ3+ARwaZY4dCacn4TQokuUhE8KVV3QJkEqLfVcvdzHkP+Jcw FcU67Xaxyqlwr1DWo71Esw2W8tBQXnzykMzHguq5hNMQlfKqPtLR7LEIF1c5NntFPDus 58HS5TIYc5Cig5T5h2GB7IqsXLkGfgmyVI9PAHQABSUyUSgeJeaaZ8U/atVKlLKkToiK aUuM2dRGjLAXtEAeGiy4GPJARRm0fcFMPFAWdDyQofYc2Dtma+73sEu5GuDFw3Af420e pCKw== X-Gm-Message-State: AJaThX64EQ8GLH2Yt4o0GfcLosko3NSjfSMGnbu28p25lekeMSy4Uom6 dBr4cf6YYffFOnDhSrwaB+M= X-Received: by 10.200.43.78 with SMTP id 14mr30103201qtv.72.1510083180088; Tue, 07 Nov 2017 11:33:00 -0800 (PST) Received: from localhost (dhcp-ec-8-6b-ed-7a-cf.cpe.echoes.net. [72.28.5.223]) by smtp.gmail.com with ESMTPSA id e66sm1417824qkc.47.2017.11.07.11.32.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 11:32:59 -0800 (PST) Date: Tue, 7 Nov 2017 11:32:57 -0800 From: Tejun Heo To: Shaohua Li Cc: LKML , Jens Axboe , Andrew Morton , Ingo Molnar , Dmitry Vyukov Subject: Re: [PATCH V2] kthread: zero the kthread data structure Message-ID: <20171107193257.GB4164960@devbig577.frc2.facebook.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 11:09:50AM -0800, Shaohua Li wrote: > kthread() could bail out early before we initialize blkcg_css (if the > kthread is killed very early. Please see xchg() statement in kthread()), > which confuses free_kthread_struct. Instead of moving the blkcg_css > initialization early, we simply zero the whole 'self' data structure, > which doesn't sound much overhead. > > Reported-by: syzbot > Fixes: 05e3db95ebfc ("kthread: add a mechanism to store cgroup info") > Cc: Andrew Morton > Cc: Ingo Molnar > Cc: Tejun Heo > Cc: Dmitry Vyukov > Signed-off-by: Shaohua Li Acked-by: Tejun Heo Thanks. -- tejun From 1583341657205743400@xxx Mon Nov 06 18:17:52 +0000 2017 X-GM-THRID: 1579035004249070389 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread