Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-15 Thread Flavio Leitner
On Mon, 6 Nov 2017 16:16:20 +0100
Jiri Benc  wrote:

> On Mon,  6 Nov 2017 15:04:54 +, Colin King wrote:
> > The size for IFLA_IF_NETNSID is missing from the size calculation
> > because the proceeding semicolon was not removed. Fix this by removing
> > the semicolon.  
> 
> Acked-by: Jiri Benc 
> 
> Thanks for spotting this! Looking at my initial code, I had that right,
> this was probably introduced during one of rebases, so I blame
> Flavio :-p (On a serious note, thank you, Flavio, for taking care of
> the rebases.)

That's right, ouch!
Thanks for fixing it.

-- 
Flavio



Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-15 Thread Flavio Leitner
On Mon, 6 Nov 2017 16:16:20 +0100
Jiri Benc  wrote:

> On Mon,  6 Nov 2017 15:04:54 +, Colin King wrote:
> > The size for IFLA_IF_NETNSID is missing from the size calculation
> > because the proceeding semicolon was not removed. Fix this by removing
> > the semicolon.  
> 
> Acked-by: Jiri Benc 
> 
> Thanks for spotting this! Looking at my initial code, I had that right,
> this was probably introduced during one of rebases, so I blame
> Flavio :-p (On a serious note, thank you, Flavio, for taking care of
> the rebases.)

That's right, ouch!
Thanks for fixing it.

-- 
Flavio



Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-07 Thread David Miller
From: Colin King 
Date: Mon,  6 Nov 2017 15:04:54 +

> From: Colin Ian King 
> 
> The size for IFLA_IF_NETNSID is missing from the size calculation
> because the proceeding semicolon was not removed. Fix this by removing
> the semicolon.
> 
> Detected by CoverityScan, CID#1461135 ("Structurally dead code")
> 
> Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface")
> Signed-off-by: Colin Ian King 

Applied to net-next, thank you!


Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-07 Thread David Miller
From: Colin King 
Date: Mon,  6 Nov 2017 15:04:54 +

> From: Colin Ian King 
> 
> The size for IFLA_IF_NETNSID is missing from the size calculation
> because the proceeding semicolon was not removed. Fix this by removing
> the semicolon.
> 
> Detected by CoverityScan, CID#1461135 ("Structurally dead code")
> 
> Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface")
> Signed-off-by: Colin Ian King 

Applied to net-next, thank you!


Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-06 Thread Jiri Benc
On Mon,  6 Nov 2017 15:04:54 +, Colin King wrote:
> The size for IFLA_IF_NETNSID is missing from the size calculation
> because the proceeding semicolon was not removed. Fix this by removing
> the semicolon.

Acked-by: Jiri Benc 

Thanks for spotting this! Looking at my initial code, I had that right,
this was probably introduced during one of rebases, so I blame
Flavio :-p (On a serious note, thank you, Flavio, for taking care of
the rebases.)

Hopefully, with the "+ 0" added, this won't happen again in this
particular piece of code in the future.

 Jiri


Re: [PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-06 Thread Jiri Benc
On Mon,  6 Nov 2017 15:04:54 +, Colin King wrote:
> The size for IFLA_IF_NETNSID is missing from the size calculation
> because the proceeding semicolon was not removed. Fix this by removing
> the semicolon.

Acked-by: Jiri Benc 

Thanks for spotting this! Looking at my initial code, I had that right,
this was probably introduced during one of rebases, so I blame
Flavio :-p (On a serious note, thank you, Flavio, for taking care of
the rebases.)

Hopefully, with the "+ 0" added, this won't happen again in this
particular piece of code in the future.

 Jiri


[PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-06 Thread Colin King
From: Colin Ian King 

The size for IFLA_IF_NETNSID is missing from the size calculation
because the proceeding semicolon was not removed. Fix this by removing
the semicolon.

Detected by CoverityScan, CID#1461135 ("Structurally dead code")

Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface")
Signed-off-by: Colin Ian King 
---
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index dc5ad84ac096..dabba2a91fc8 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -920,7 +920,7 @@ static noinline size_t if_nlmsg_size(const struct 
net_device *dev,
   + rtnl_xdp_size() /* IFLA_XDP */
   + nla_total_size(4)  /* IFLA_EVENT */
   + nla_total_size(4)  /* IFLA_NEW_NETNSID */
-  + nla_total_size(1); /* IFLA_PROTO_DOWN */
+  + nla_total_size(1)  /* IFLA_PROTO_DOWN */
   + nla_total_size(4)  /* IFLA_IF_NETNSID */
   + 0;
 }
-- 
2.14.1



[PATCH] rtnetlink: fix missing size for IFLA_IF_NETNSID

2017-11-06 Thread Colin King
From: Colin Ian King 

The size for IFLA_IF_NETNSID is missing from the size calculation
because the proceeding semicolon was not removed. Fix this by removing
the semicolon.

Detected by CoverityScan, CID#1461135 ("Structurally dead code")

Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface")
Signed-off-by: Colin Ian King 
---
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index dc5ad84ac096..dabba2a91fc8 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -920,7 +920,7 @@ static noinline size_t if_nlmsg_size(const struct 
net_device *dev,
   + rtnl_xdp_size() /* IFLA_XDP */
   + nla_total_size(4)  /* IFLA_EVENT */
   + nla_total_size(4)  /* IFLA_NEW_NETNSID */
-  + nla_total_size(1); /* IFLA_PROTO_DOWN */
+  + nla_total_size(1)  /* IFLA_PROTO_DOWN */
   + nla_total_size(4)  /* IFLA_IF_NETNSID */
   + 0;
 }
-- 
2.14.1