All of lore.kernel.org
 help / color / mirror / Atom feed
* [iproute PATCH] rdma: Fix for ineffective check in add_filter()
@ 2018-10-18 11:41 Phil Sutter
  2018-10-18 15:27 ` David Ahern
  2018-10-22 17:06 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Phil Sutter @ 2018-10-18 11:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Arkadi Sharshevsky

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")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 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;
 };
 
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()
  2018-10-18 11:41 [iproute PATCH] rdma: Fix for ineffective check in add_filter() Phil Sutter
@ 2018-10-18 15:27 ` David Ahern
  2018-10-18 16:17   ` Phil Sutter
  2018-10-22 17:06 ` Stephen Hemminger
  1 sibling, 1 reply; 4+ messages in thread
From: David Ahern @ 2018-10-18 15:27 UTC (permalink / raw)
  To: Phil Sutter, Stephen Hemminger; +Cc: netdev, Arkadi Sharshevsky

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 <phil@nwl.cc>
> ---
>  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;
>  };
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()
  2018-10-18 15:27 ` David Ahern
@ 2018-10-18 16:17   ` Phil Sutter
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2018-10-18 16:17 UTC (permalink / raw)
  To: David Ahern
  Cc: Stephen Hemminger, netdev, Arkadi Sharshevsky, Leon Romanovsky

Hi,

On Thu, Oct 18, 2018 at 09:27:47AM -0600, David Ahern wrote:
> 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")

Oh, indeed. Also the wrong person in Cc: Arkadi is innocent, culprit
patch came from Leon.

Stephen, should I respin or will you correct the Fixes tag?

Thanks, Phil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iproute PATCH] rdma: Fix for ineffective check in add_filter()
  2018-10-18 11:41 [iproute PATCH] rdma: Fix for ineffective check in add_filter() Phil Sutter
  2018-10-18 15:27 ` David Ahern
@ 2018-10-22 17:06 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2018-10-22 17:06 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev, Arkadi Sharshevsky

On Thu, 18 Oct 2018 13:41:54 +0200
Phil Sutter <phil@nwl.cc> 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")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Applied, and fixed fixes

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-23  1:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 11:41 [iproute PATCH] rdma: Fix for ineffective check in add_filter() Phil Sutter
2018-10-18 15:27 ` David Ahern
2018-10-18 16:17   ` Phil Sutter
2018-10-22 17:06 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.