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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14717C10F1B for ; Wed, 14 Dec 2022 03:12:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237109AbiLNDMl (ORCPT ); Tue, 13 Dec 2022 22:12:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236910AbiLNDMi (ORCPT ); Tue, 13 Dec 2022 22:12:38 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE9FED for ; Tue, 13 Dec 2022 19:12:36 -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 AF95260B5A for ; Wed, 14 Dec 2022 03:12:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77F4C433EF; Wed, 14 Dec 2022 03:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670987555; bh=Ge/57PmwkIaCoOixxazI6O0UUvTQxryyZ77gcuXZz7k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CLt/ww8B59ZQPkwrVXM6tN4U3TwtYjVMLCIUULveprBVSBLLAYG7QNh7TT42myUgF HJZFrms023bvxZxjWFXzShJCM0qJrh7G5JoUqdUb6i2b937mUeFPCzmr4Cz/pYXDt3 WQCtrrW1CufoyWJbqPmj4vY9kce6l85fhjtYxqZvvubVpmP0RlB/BRQuG9DcGfkxEm VEyYBVhtdDLZz7IkiaBRsQqrH5OSqozl204xHom6o1EB+MJbyEn+qD/Be3MBe1xkPI 2tCNXZLEFvco2JenJk/XLj/Y7DEy0QbJyhq/2cnjHwWYpKuX3Y/ZBBfLqkLPCwmtF2 dIkAi4dUax+5Q== Date: Tue, 13 Dec 2022 19:12:33 -0800 From: Jakub Kicinski To: Leon Romanovsky Cc: Nir Levy , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org Subject: Re: [PATCH net v2] net: atm: Fix use-after-free bug in atm_dev_register() Message-ID: <20221213191233.5d0a7c8f@kernel.org> In-Reply-To: References: <20221211124943.3004-1-bhr166@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 12 Dec 2022 09:12:30 +0200 Leon Romanovsky wrote: > > v2: Call put_device in atm_register_sysfs instead of atm_dev_register. > > Reviewed-by: Leon Romanovsky On one of the previous versions you commented that atm_unregister_sysfs() also needs to move to unregister() rather than del(): https://lore.kernel.org/all/Y48CwyATYAAcPgqT@unreal/ Is that not the case? Also atm_dev_register() still frees the dev on atm_register_sysfs() failure, is that okay?