Skip to contentSkip to conversation

net: fix IFF_TX_SKB_NO_LINEAR definition

PATCH Applied Dan Carpenter 3 participants 3 messages Jun 23, 2022 – Jun 25, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: fix IFF_TX_SKB_NO_LINEAR definition

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")

---
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(-)
include/linux/netdevice.h +1 -1
index 89afa4f7747d..1a3cb93c3dcc 100644
@@ -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),
 };
 
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dan Carpenter

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")

Thanks.

Quoted 22 lines

---
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(-)
include/linux/netdevice.h +1 -2
index 89afa4f7747d..1a3cb93c3dcc 100644
@@ -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

#2 lore raw
In reply to Dan Carpenter
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 9 lines · 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")

---
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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html