From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750998AbcLEIc5 (ORCPT ); Mon, 5 Dec 2016 03:32:57 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34776 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbcLEIcw (ORCPT ); Mon, 5 Dec 2016 03:32:52 -0500 Date: Mon, 5 Dec 2016 09:32:07 +0100 From: Richard Cochran To: Deng Feng Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "cxdx2006@gmail.com" Subject: Re: [PATCH]PTP:PTP_CHARDEV:add input parameters check to avoid the NULL pointer reference Message-ID: <20161205083207.GB18980@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2016 at 08:02:02AM +0000, Deng Feng wrote: > When we call one function which contained pointers as input parameters, > we must check the pointers are NULL or not before we make use of them, > which avoid the NULL pointer reference . NAK. These functions belong to an internal kernel API, and the callers always provide non-NULL arguments. This isn't some user space library. Thanks, Richard