From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B353C433FE for ; Mon, 18 Oct 2021 08:15:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C65D360ED4 for ; Mon, 18 Oct 2021 08:15:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C65D360ED4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6A7186B0072; Mon, 18 Oct 2021 04:15:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 657486B0073; Mon, 18 Oct 2021 04:15:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56D68900002; Mon, 18 Oct 2021 04:15:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 4A30C6B0072 for ; Mon, 18 Oct 2021 04:15:11 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 089A518031913 for ; Mon, 18 Oct 2021 08:15:11 +0000 (UTC) X-FDA: 78708848022.01.45D79D6 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf06.hostedemail.com (Postfix) with ESMTP id BEE0B801A89B for ; Mon, 18 Oct 2021 08:15:09 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id EACFB68BEB; Mon, 18 Oct 2021 10:15:05 +0200 (CEST) Date: Mon, 18 Oct 2021 10:15:05 +0200 From: Christoph Hellwig To: Zqiang Cc: Christoph Hellwig , Hao Sun , Hillf Danton , hch@infradead.org, willy@infradead.org, Linux MM , Linux Kernel Mailing List , syzkaller-bugs@googlegroups.com Subject: Re: WARNING in __init_work Message-ID: <20211018081505.GA28629@lst.de> References: <20210907074432.3711-1-hdanton@sina.com> <20211018044745.GA23657@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=none; spf=none (imf06.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: BEE0B801A89B X-Stat-Signature: r3sxweij3k5zkgcehow8gy5aywowb9mc X-HE-Tag: 1634544909-181523 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000242, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 18, 2021 at 03:21:18PM +0800, Zqiang wrote: > I find in add_partition(),=C2=A0 if the device_add() return error, we w= ill drop=20 > disk object reference count, > > but i find put_device(pdev) (will call part_release())and put_disk(disk= ),=20 > both will reduce the reference of the disk object , however we call=20 > get_device(disk_to_dev(disk)) only once > > or Did I miss something and didn't analyze it=EF=BC=9F Yes, this sounds correct. Do you want to send a patch or should I prepare one?