Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp601885pxu; Tue, 5 Jan 2021 22:11:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFx3lUI6nCGPk4o6fPk7OjLE9TqalWhjmNTurAg/Wl/e5XQHqLVxCzfYhkFCmfySRR91nj X-Received: by 2002:a50:b944:: with SMTP id m62mr2879812ede.182.1609913460633; Tue, 05 Jan 2021 22:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609913460; cv=none; d=google.com; s=arc-20160816; b=oROK/5FKG7jxX5wYX5zhGNYxEBN8idS5ouFP6Pg473EYb/ya0UaA2M5DgOVEKhvk4T VbAtdd3yxmOpNilAeQ2iLk/JWVtVefDVSAnirIsLuAnf/QvBRUEioBm9B38SLfzWBsQM bTnqkIULG8e55WNOGSs4s4xBPE/fZi+pFFWJ41utOJumf75kWfLeec9tFgWZANjzQ+4Y Ogl8TLKnvLio3cBBW09wSk2qevqvFBG/waA9RhUQs6kaehio4Xjg5ECjecU/zjPqilom n7pzo/tjQfZLK9G7wWsMWMmNXxhweQhHLMcW3BqECbjD41vUOsnHvaknEeStYdkL+kEI BcaA== 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=t1HiTrcChdaGodQBhC3czR0EmxtNTS7IOzLn/jO+MUM=; b=Y8uLrEqh7s0qJGeWKmMsK6zYezn6dY366nZ/418mvwlN1mOWdj2GBuTD8lF5/I/Gjt RbgG0ezfM6J/3t7W1osxko5JBWqDUBdrOaKxjYrTMTrIjQLY0ocyz/f6s4akeRGTeLFA T0IgAa/rh93WvMxaAsrU9hU1hcrsPUrdBsjn13MH094ITxHSa2HtTV8m4db94mzpXvuk 3hF5l+fcG0for0X/59ct6AQnwApzDa4y4PiYoPCoOaDOwqDJeRJJdX1rA2pYlBKMfsTp QVwr7ReuhL5h/EdJG4LoEu86u1R1mG4JvJOxZzH4i07BT14DCoY3oK0O3BanSrKGPI0O xLrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si623680ejc.748.2021.01.05.22.10.37; Tue, 05 Jan 2021 22:11:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbhAFGHl (ORCPT + 99 others); Wed, 6 Jan 2021 01:07:41 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10025 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725813AbhAFGHk (ORCPT ); Wed, 6 Jan 2021 01:07:40 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4D9f4W0xZlzj4K4; Wed, 6 Jan 2021 14:06:03 +0800 (CST) Received: from [10.174.177.149] (10.174.177.149) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Wed, 6 Jan 2021 14:06:49 +0800 Subject: Re: [PATCH v2] net: qrtr: fix null pointer dereference in qrtr_ns_remove To: Markus Elfring , CC: , , , "David S. Miller" , Jakub Kicinski References: <20210105055754.16486-1-miaoqinglang@huawei.com> <4596fb37-5e74-5bf6-60e5-ded6fbb83969@web.de> From: Qinglang Miao Message-ID: Date: Wed, 6 Jan 2021 14:06:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <4596fb37-5e74-5bf6-60e5-ded6fbb83969@web.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.149] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Markus, I'd like to take some of your advice in this patch, but I noticed that this one has been applied. Some of your advice would be considered kindly on my future work. Thanks. 在 2021/1/5 21:14, Markus Elfring 写道: >> A null-ptr-deref bug is reported by Hulk Robot like this: > > Can it be clearer to use the term “null pointer dereference” for the final commit message? This advice is too detailed for 'null-ptr-deref' is known as a general phrase like 'use-after-free' for kernel developer, I think.> > >> -------------- > > I suggest to choose an other character for drawing such a text line. It's an acceptable advice, thanks. > > >> Fix it by making … > > Would you like to replace this wording by the tag “Fixes”? Sorry, I didn't get your words. 'Fix it by' follows the solution 'Fixes' follows the commit which brought the problem. In fact, I do considered using 'Fixes' on this one, but it's hard to tell which specific commit brought this null pointer dereference. > > Will an other imperative wording variant be helpful for this change description? > > > … >> +++ b/net/qrtr/qrtr.c >> @@ -1287,13 +1287,19 @@ static int __init qrtr_proto_init(void) > … >> +err_sock: >> + sock_unregister(qrtr_family.family); >> +err_proto: >> + proto_unregister(&qrtr_proto); >> return rc; >> } > > Would it be clearer to use the labels “unregister_sock” and “unregister_proto”? In fact, The reason I use 'err_sock' rather than 'unregister_sock' is to keep same in 'net/qrtr/ns.c'. I agree with you that “unregister_sock” is better in normal case. > > Regards, > Markus > . >