From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: [PATCH net-next] rds: debug: fix null check on static array Date: Wed, 6 Dec 2017 06:32:11 -0500 Message-ID: <20171206113211.GA8331@oracle.com> References: <20171206014704.3796-1-bhole_prashant_q7@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S . Miller" , netdev@vger.kernel.org, Santosh Shilimkar , linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com To: Prashant Bhole Return-path: Received: from userp2130.oracle.com ([156.151.31.86]:56492 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbdLFLcZ (ORCPT ); Wed, 6 Dec 2017 06:32:25 -0500 Content-Disposition: inline In-Reply-To: <20171206014704.3796-1-bhole_prashant_q7@lab.ntt.co.jp> Sender: netdev-owner@vger.kernel.org List-ID: On (12/06/17 10:47), Prashant Bhole wrote: > > t_name cannot be NULL since it is an array field of a struct. > Replacing null check on static array with string length check using > strnlen() t_name is always initialized for all rds transports today, and would be all zeros unless someone stomped over that memory (in which case there could be more serious issues than a busted debug string) but it's good to be safe and check I suppose. Acked-by: Sowmini Varadhan --Sowmini