Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10596867pxu; Wed, 30 Dec 2020 06:43:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5gIree7XbPQH1ltEf5Hu7gBuUOnoXRWOKrKYBm66S0u06xAX/M81PjnCV04OrOc0pAFa0 X-Received: by 2002:aa7:ca03:: with SMTP id y3mr51670221eds.87.1609339380079; Wed, 30 Dec 2020 06:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609339380; cv=none; d=google.com; s=arc-20160816; b=vQQHEq5ddVCpf833i+U+AErew8Jk89om4He9zSHpeG1Y8jlG/R6U6r1+aw9QzTIc5O sQOveZkTY30VGWjCVsIhGg2/6LVOoxjuhWZD03uuxpfYYdlliycmR1HSzKluCfFBMj6d Wmob3pglCLpt8EVWH18+4r2g19y2GFLNdgvlxF5z4EGU2cgb2Qekx20CKG8QFAB/Jez7 YoD91NC5EulJ9M40k8u8wJ8SLj+cvwczAY7Fg897gXZSJJBQulxJpPrU6kPnjCpavIaB qZJBWzAu6o6kPiomEfsJGSALpBe403kHjyvSsAvvuMY9eqjB6jPQhKCOj9zel4oCjanw RpCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=J7T+oYokC5MTWNQWvjyooJnAgpITgAO2Z+RdOhPS5BY=; b=WLQAP+0Z4n8plk+jIKesLCgQusFcpe3Tr/MpKAnukYlWNQuDgSd2idPPvJOjiW+xm8 hTFrmcmHQzO9FyJAKo1OYZCtjwIs2e6fm31V1kyfSPZ+Hxrxid5Dv0CEtw4TC1x7UOtp 6baHrVZ7pFqTIPMUG9qFLJtgui+CdxQx0Y1ByIPai9yRAQx8wAmbfO7AD5X+F//Gwuvt GRG7EcJm6Fupp9QFIrw2tRuDGJicUV4wsMAEzbDDIrEoYu23rM3hlKCTJV58VSpgKPT/ IBdSh/QeZp7JXiXWwKbllKKfYy/gDr3e/9vc1cP9G2Q5vqam+k0z9odOxFMDDDBaN+PH Q08g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd25si24170692edb.438.2020.12.30.06.42.37; Wed, 30 Dec 2020 06:43:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726428AbgL3Ois (ORCPT + 99 others); Wed, 30 Dec 2020 09:38:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:57632 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgL3Oir (ORCPT ); Wed, 30 Dec 2020 09:38:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 01D28ABA1; Wed, 30 Dec 2020 14:38:06 +0000 (UTC) Date: Wed, 30 Dec 2020 15:38:05 +0100 From: Daniel Wagner To: Hannes Reinecke Cc: Enzo Matsumiya , linux-nvme@lists.infradead.org, Jens Axboe , Keith Busch , Christoph Hellwig , Sagi Grimberg , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: hwmon: fix crash on device teardown Message-ID: <20201230143805.2v4izgkzbnisssvr@beryllium.lan> References: <20201209213228.5044-1-ematsumiya@suse.de> <4ebb1b8c-4bb0-6ebf-3417-d4aee1bdd3a8@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ebb1b8c-4bb0-6ebf-3417-d4aee1bdd3a8@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 03:12:53PM +0100, Hannes Reinecke wrote: > So why do we have to deallocate the hwmon attributes? > And why on reset? And who's re-creating them after reset, seeing that > 'initialized' should be true? nvmet: adding nsid 1 to subsystem blktests-subsystem-1 nvmet: creating controller 1 for subsystem blktests-subsystem-1 for NQN nqn.2014-08.org.nvmexpress:uu. nvme-fabrics ctl: DEVRES ADD 000000009bc92dfd devm_kzalloc_release (552 bytes) nvme-fabrics ctl: DEVRES ADD 0000000099e1e156 devm_hwmon_release (8 bytes) I've enabled CONFIG_DEVRES_DEBUG and see only 'DEVRES ADD' message. If I read it correctly the problem is that the resource is attached to the ctl devm object and not for the nvme devm object.