mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
sctp: fix SSN comparision
This function actually operates on u32 yet its paramteres were declared as u16, causing integer truncation upon calling. Note in patch context that ADDIP_SERIAL_SIGN_BIT is already 32 bits. Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8ab86c00e3
commit
4496195ddd
@ -382,7 +382,7 @@ enum {
|
||||
ADDIP_SERIAL_SIGN_BIT = (1<<31)
|
||||
};
|
||||
|
||||
static inline int ADDIP_SERIAL_gte(__u16 s, __u16 t)
|
||||
static inline int ADDIP_SERIAL_gte(__u32 s, __u32 t)
|
||||
{
|
||||
return ((s) == (t)) || (((t) - (s)) & ADDIP_SERIAL_SIGN_BIT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user