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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC15C61DA4 for ; Sat, 11 Mar 2023 08:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbjCKILC (ORCPT ); Sat, 11 Mar 2023 03:11:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjCKIKz (ORCPT ); Sat, 11 Mar 2023 03:10:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF8AA5E7 for ; Sat, 11 Mar 2023 00:10:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4037A609EB for ; Sat, 11 Mar 2023 08:10:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17A59C433EF; Sat, 11 Mar 2023 08:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678522253; bh=O1RUhPN/GmioYSQfO19oEWifAQg4f/SmTr52PPhbLGE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tqMwzf92FLs8CP4YS81Bph+YAiviE3/xpmv3s5aZJpEAnIPD/2jYPXMXxldeNyANG jS9J0QJ8Y4Zp2N750LdoDkb4cxSN2NOban4BfVOL3oFI5LhYNDZYcdH3k/d9jjuDyR WkYvRb50EOB9yI3swBfrlyLS9f/bYzKzQCmJ1W5E= Date: Sat, 11 Mar 2023 09:10:50 +0100 From: Greg Kroah-Hartman To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Mirsad Todorovac Subject: Re: [PATCH 3/4] kobject: validate ktype release function during add Message-ID: References: <20230311-kobject-warning-v1-0-1ebba4f71fb5@weissschuh.net> <20230311-kobject-warning-v1-3-1ebba4f71fb5@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230311-kobject-warning-v1-3-1ebba4f71fb5@weissschuh.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 11, 2023 at 03:14:48AM +0000, Thomas Wei?schuh wrote: > Validating the ktype during cleanup is suboptimal. > Many kobjects are only destroyed during shutdown which makes it hard to > observe the messages. > > Instead perform the validation when the object is added. As much as I would like to do this, it will cause way too many false-positives at this point in time, sorry. Yes, kobjects should always have a release function, but for some, they are static structures and so do not have them, which is why we only report the problem when the object is going away as that is when it matters. So if you fix up all the in-kernel static kobjects first, then we can take this type of change, sorry. Your first 2 are great though, I'll go queue them up next week, thanks for the cleanups there. greg k-h