Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3709081iog; Tue, 28 Jun 2022 00:36:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uu5aEwDk5MvfSdA636F5tPf8S/MTh4OeLY86FDIjsjyOmlw47B9VInFyr1mm0ypQ4OR6oK X-Received: by 2002:a05:6402:190e:b0:435:c4cd:ec2 with SMTP id e14-20020a056402190e00b00435c4cd0ec2mr21086101edz.127.1656401768953; Tue, 28 Jun 2022 00:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656401768; cv=none; d=google.com; s=arc-20160816; b=ywEeygLAxHoG0mb/J1ITmSmTtqbhqVCYbj1zFcOM4fkTDXWydOHg8qJQllDaR+kQB5 rkX/JYAopwkvM/HJoCO93WKrKRezsvUfEuNC4TL6e355bbbX4RmlalYcCnodaz40mqOe MjfQR01/2pgz4m26N5MjmDFOnvCXZW/GmxAOQKWPpCK1WAbF078GzOypRP6xUEk85nmn gxuuOQDFQWSuB3Qu3AlPcLgQKBmiaT/IvpJJuM8Jb9uhn5tFDxKbN9zzHgraruuVtb8W MZs2TbiKuQ2X2sZEVQS/I7+mwWzL3y5GKXj77T2KbUqZPUN0xsTLfNtMZJGT2rD1MIWJ EjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=SDiMFBB+AffepuPz4SzzIFzP45d6feWoA9ZCqwr1pyo=; b=WW9wZwfaznv/hzXIecH6ssalwvHhbB4GyXD7b91Uzu36TjC4at3cO/NuSQDCMTeOWi Ik5Chw2rGEckPUp81Dd2k5WXCA+OZfPrpu0BIYcjb2jrzDtMqiiLxuStpccFiRya26gM QvAkncm84rcDShWOAuALilVbPSwJ5nyzp0n8KVZaY8YAEmC6GuqogJfoYVCTrHbhYIpS GXbrZKgTRVgSmtSLlaL1RZFl5z1lGy3QdO8kEoaW/tooOBHt7oW4scrUjde1GrhDBRam AnsfOmU5wNoaCmFC4Fb8ZzPhie3x1KgS9gNCTxPR1R/BmZAAAuZi75gdfkTbLPklOCkA 1RXQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020aa7dac1000000b0043564aec56bsi14337750eds.52.2022.06.28.00.35.36; Tue, 28 Jun 2022 00:36:08 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbiF1H3I (ORCPT + 99 others); Tue, 28 Jun 2022 03:29:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242141AbiF1H3G (ORCPT ); Tue, 28 Jun 2022 03:29:06 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C5ABE008; Tue, 28 Jun 2022 00:29:05 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LXGQS0yM0zkWf2; Tue, 28 Jun 2022 15:27:44 +0800 (CST) Received: from [10.67.110.112] (10.67.110.112) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 28 Jun 2022 15:29:02 +0800 Subject: Re: [PATCH -next] lsm_audit: Clean up redundant NULL pointer check To: Paul Moore CC: , , , References: <20220614121030.115491-1-xiujianfeng@huawei.com> From: xiujianfeng Message-ID: <1f736550-b9ac-04f8-9056-6c3cd0f2d8fe@huawei.com> Date: Tue, 28 Jun 2022 15:29:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.112] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi, 在 2022/6/15 10:07, Paul Moore 写道: > On Tue, Jun 14, 2022 at 8:13 AM Xiu Jianfeng wrote: >> The implements of {ip,tcp,udp,dccp,sctp,ipv6}_hdr(skb) guarantee that >> they will never return NULL, and elsewhere user don't do the check >> as well, so remove the check here. >> >> Signed-off-by: Xiu Jianfeng >> --- >> security/lsm_audit.c | 14 +------------- >> 1 file changed, 1 insertion(+), 13 deletions(-) > Reviewed-by: Paul Moore Thanks for the review, and kindly ping here ...