Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6007620rwi; Tue, 18 Oct 2022 07:04:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nqbwFGoepnTyWTigaDH61NobKyGVHwKAO047Gu/t0+PMuru+NzCrVXQ+SL37lIO+lrcPx X-Received: by 2002:a17:902:820a:b0:178:456e:138 with SMTP id x10-20020a170902820a00b00178456e0138mr3231945pln.145.1666101884236; Tue, 18 Oct 2022 07:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666101884; cv=none; d=google.com; s=arc-20160816; b=0W9NQvctexYhhGcZcDgQLqlzaiuqxXk1cncSTmVXZ0iPJpuxR/d5m1qexWNB22I6+N HeGB0gnPDUks1TuC4GDR+OGZflswWSI7nNpQO4tensoU5v3rU1rY3Uo3vamKHBayf8e/ 0ajiyAGZBc/zCbtEwOrkLyPwoJ3SQH55MrixfJiSpv9LI0iU38DK/hg1/igvVU5PXing upJVICdtiil0cInXwJt6os7ATfHR+ZahV1T6/LlaAhUam78uz8GPPMknC10u9nDxK7gO pW5TSMiky7sywMYdYRgm8FhhB7FKXIigsAVWjF04sG9xQvfvHHuHcskFZWIBShAhFp1g z5sQ== 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:dkim-signature; bh=fjVw48LCOjmuPHD5GFo98Aoe97xClTBrD9ym0zau0wQ=; b=KCuYJztQkwx8CuCBadNJN9MplG+7SUjxbqHTidQJzfhoAEKWPOn5Ikzbgp4/yajnrx 4QLRt4HQz+0zL+W2PvG1lc5pr9oi5uxlLHcyxbeXcdM8Mjj1EepAqJh8zSagPJmQF8y8 cUcs1qR9M9BJXpmi2U8/j76ohX0gavNxhQUxC+oNkoRMMAmkFFPieJEbREDfdQM8c5bO zBIKJJGmLuL09vwpPdgt+nSupfUci+vxJ9UtDqtH137lld329SSvVcNBI7j1q5teKFJT 0gBL5YQiWidjB1Rdox+foTNuNLnsUDcZZmGi/w4v9qkDNTcDSWVJAYAdamOAOZmcc+gs zqnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y0D2BNi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056a0022c700b00537e88da121si16605749pfj.35.2022.10.18.07.04.14; Tue, 18 Oct 2022 07:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y0D2BNi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbiJRNAt (ORCPT + 99 others); Tue, 18 Oct 2022 09:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbiJRNAr (ORCPT ); Tue, 18 Oct 2022 09:00:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE40E27CD4; Tue, 18 Oct 2022 06:00:46 -0700 (PDT) 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 4928E6153C; Tue, 18 Oct 2022 13:00:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B199C433C1; Tue, 18 Oct 2022 13:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666098045; bh=9mCwQDMxzukwjgNJrJ/kqAbnhGTEPmzbhDbM9GD+mlI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=y0D2BNi1dW/pbcc052oKEXurvbiajjF1DYqHssCDm/qLWmjTVOXjzwfOTVXVYI109 mqQeo8yIRVbcNPraeOgTJxJoc4Vw0rtBD94PKjAZZgme8tbc7ZfhQVuD1mNkZRw95M mnflV9oLt/t+gLmQWLu//p96YfucjRS4ePR1JLnQ= Date: Tue, 18 Oct 2022 15:00:43 +0200 From: Greg KH To: Yu Kuai Cc: hch@lst.de, axboe@kernel.dk, willy@infradead.org, martin.petersen@oracle.com, kch@nvidia.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai1@huaweicloud.com, yi.zhang@huawei.com Subject: Re: [PATCH RFC 1/2] kobject: add return value for kobject_put() Message-ID: References: <20221018131432.434167-1-yukuai3@huawei.com> <20221018131432.434167-2-yukuai3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018131432.434167-2-yukuai3@huawei.com> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 09:14:31PM +0800, Yu Kuai wrote: > The return value will be used in later patch to fix uaf for slave_dir > and bd_holder_dir in block layer. Then the user will be incorrect, this is not ok, you should never care if you are the last "put" on an object at all. Hint, what happens right after you call this and get the result? sorry, but NAK. greg k-h