From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter() Date: Thu, 18 Oct 2018 09:27:47 -0600 Message-ID: <6b365665-100c-d6e2-56bd-dfac39b55806@gmail.com> References: <20181018114154.8886-1-phil@nwl.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Arkadi Sharshevsky To: Phil Sutter , Stephen Hemminger Return-path: Received: from mail-pf1-f193.google.com ([209.85.210.193]:41948 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727105AbeJRX3V (ORCPT ); Thu, 18 Oct 2018 19:29:21 -0400 Received: by mail-pf1-f193.google.com with SMTP id m77-v6so15044159pfi.8 for ; Thu, 18 Oct 2018 08:27:50 -0700 (PDT) In-Reply-To: <20181018114154.8886-1-phil@nwl.cc> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/18/18 5:41 AM, Phil Sutter wrote: > With 'name' field defined as array in struct filters, it will always > contain a value irrespective of whether a name was assigned or not. > > Fix this by turning the field into a const char pointer. > > Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Stale paste buffer? Seems like the correct tag is Fixes: 1174be72d1b4c ("rdma: Add filtering infrastructure") > Signed-off-by: Phil Sutter > --- > rdma/rdma.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rdma/rdma.h b/rdma/rdma.h > index d4b7ba1918b13..c3b7530b6cc71 100644 > --- a/rdma/rdma.h > +++ b/rdma/rdma.h > @@ -34,7 +34,7 @@ > > #define MAX_NUMBER_OF_FILTERS 64 > struct filters { > - char name[32]; > + const char *name; > bool is_number; > }; > >