Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 19:23, Wei Wang wrote: > On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: >> On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >>> From: Colin Ian King >>> >>> The use of the | operator always leads to true on the expression >>> (rt->rt6i_flags | RTF_CACHE) which lo

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Wei Wang
On Tue, Oct 10, 2017 at 11:10 AM, Martin KaFai Lau wrote: > On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: >> From: Colin Ian King >> >> The use of the | operator always leads to true on the expression >> (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I >> believe thi

Re: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Martin KaFai Lau
On Tue, Oct 10, 2017 at 05:55:27PM +, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true on the expression > (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I > believe this is fixed by using & instead to just check the > RTF_CACHE entry

NACK: [PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin Ian King
On 10/10/17 18:55, Colin King wrote: > From: Colin Ian King > > The use of the | operator always leads to true on the expression > (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I > believe this is fixed by using & instead to just check the > RTF_CACHE entry bit. > > Detected by

[PATCH][net-next] ipv6: fix incorrect bitwise operator used on rt6i_flags

2017-10-10 Thread Colin King
From: Colin Ian King The use of the | operator always leads to true on the expression (rt->rt6i_flags | RTF_CACHE) which looks rather suspect to me. I believe this is fixed by using & instead to just check the RTF_CACHE entry bit. Detected by CoverityScan, CID#1457747 ("Wrong operator used") Fi