diff options
author | Jiunn Chang <c0d1n61at3@gmail.com> | 2019-06-27 05:25:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-29 20:06:17 +0200 |
commit | 79293f49677e2e703ef0d0efc9919319adacb3fb (patch) | |
tree | 76e8a78b1f2caf098a963d65265be98d176b9d08 /include/uapi | |
parent | net: make skb_dst_force return true when dst is refcounted (diff) | |
download | linux-79293f49677e2e703ef0d0efc9919319adacb3fb.tar.xz linux-79293f49677e2e703ef0d0efc9919319adacb3fb.zip |
packet: Fix undefined behavior in bit shift
Shifting signed 32-bit value by 31 bits is undefined. Changing most
significant bit to unsigned.
Changes included in v2:
- use subsystem specific subject lines
- CC required mailing lists
Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/if_packet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h index 467b654bd4c7..3d884d68eb30 100644 --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h @@ -123,7 +123,7 @@ struct tpacket_auxdata { /* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29) #define TP_STATUS_TS_SYS_HARDWARE (1 << 30) /* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31) /* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1 |