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 B6CFAC43334 for ; Fri, 8 Jul 2022 16:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238408AbiGHQmG (ORCPT ); Fri, 8 Jul 2022 12:42:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238214AbiGHQmG (ORCPT ); Fri, 8 Jul 2022 12:42:06 -0400 Received: from smtp-fw-9103.amazon.com (smtp-fw-9103.amazon.com [207.171.188.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664D85C9C0 for ; Fri, 8 Jul 2022 09:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1657298525; x=1688834525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SqbX4dqq1Ory3L7jPKe783CtDWBwSZDzSkeE9jTX120=; b=WsQ1A9XlH8dicuwO1N89mOOLMH4xNEU2PC4Yz2GEHgtpJn7nhs8/fEu9 W9BCNSjnKYw+kSelTgs3qIngtU4tMXyG6SgjXpmW3F96pVSCwo61wPerw DsFP8hdxBUWESpFcsEFMZSz0JHtH+F3fXz+fZalb102eDCcvUVbwLjePf M=; X-IronPort-AV: E=Sophos;i="5.92,256,1650931200"; d="scan'208";a="1032148002" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-1801e169.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP; 08 Jul 2022 16:41:49 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2a-1801e169.us-west-2.amazon.com (Postfix) with ESMTPS id 15CD2C08B6; Fri, 8 Jul 2022 16:41:49 +0000 (UTC) Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Fri, 8 Jul 2022 16:41:48 +0000 Received: from 88665a182662.ant.amazon.com (10.43.161.228) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.9; Fri, 8 Jul 2022 16:41:46 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , Subject: [PATCH net] af_unix: fix unix_sysctl_register() error path Date: Fri, 8 Jul 2022 09:41:33 -0700 Message-ID: <20220708164133.66325-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220708162858.1955086-1-edumazet@google.com> References: <20220708162858.1955086-1-edumazet@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.161.228] X-ClientProxiedBy: EX13D47UWC001.ant.amazon.com (10.43.162.39) To EX19D004ANA001.ant.amazon.com (10.37.240.138) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet Date: Fri, 8 Jul 2022 16:28:58 +0000 > We want to kfree(table) if @table has been kmalloced, > ie for non initial network namespace. > > Fixes: 849d5aa3a1d8 ("af_unix: Do not call kmemdup() for init_net's sysctl table.") > Signed-off-by: Eric Dumazet Acked-by: Kuniyuki Iwashima Sorry for my carelessness and thank you for the fix! Best regards, Kuniyuki