diff mbox series

[net] net: fix IFF_TX_SKB_NO_LINEAR definition

Message ID YrRrcGttfEVnf85Q@kili (mailing list archive)
State Accepted
Commit 3b89b511ea0c705cc418440e2abf9d692a556d84
Delegated to: Netdev Maintainers
Headers show
Series [net] net: fix IFF_TX_SKB_NO_LINEAR definition | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net, async
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 4642 this patch: 4642
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 1137 this patch: 1137
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 4796 this patch: 4796
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter June 23, 2022, 1:32 p.m. UTC
The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
0xffffffff80000000 instead of 0x0000000080000000.

Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.

 include/linux/netdevice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xuan Zhuo June 24, 2022, 2:40 a.m. UTC | #1
On Thu, 23 Jun 2022 16:32:32 +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
> 0xffffffff80000000 instead of 0x0000000080000000.
>
> Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>

Thanks.

> ---
> Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.
>
>  include/linux/netdevice.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 89afa4f7747d..1a3cb93c3dcc 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1671,7 +1671,7 @@ enum netdev_priv_flags {
>  	IFF_FAILOVER_SLAVE		= 1<<28,
>  	IFF_L3MDEV_RX_HANDLER		= 1<<29,
>  	IFF_LIVE_RENAME_OK		= 1<<30,
> -	IFF_TX_SKB_NO_LINEAR		= 1<<31,
> +	IFF_TX_SKB_NO_LINEAR		= BIT_ULL(31),
>  	IFF_CHANGE_PROTO_DOWN		= BIT_ULL(32),
>  };
>
> --
> 2.35.1
>
patchwork-bot+netdevbpf@kernel.org June 25, 2022, 5:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 23 Jun 2022 16:32:32 +0300 you wrote:
> The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
> 0xffffffff80000000 instead of 0x0000000080000000.
> 
> Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.
> 
> [...]

Here is the summary with links:
  - [net] net: fix IFF_TX_SKB_NO_LINEAR definition
    https://git.kernel.org/netdev/net/c/3b89b511ea0c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 89afa4f7747d..1a3cb93c3dcc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1671,7 +1671,7 @@  enum netdev_priv_flags {
 	IFF_FAILOVER_SLAVE		= 1<<28,
 	IFF_L3MDEV_RX_HANDLER		= 1<<29,
 	IFF_LIVE_RENAME_OK		= 1<<30,
-	IFF_TX_SKB_NO_LINEAR		= 1<<31,
+	IFF_TX_SKB_NO_LINEAR		= BIT_ULL(31),
 	IFF_CHANGE_PROTO_DOWN		= BIT_ULL(32),
 };