All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] sctp: fix SSN comparision
@ 2016-09-15 18:02 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 17+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-09-15 18:02 UTC (permalink / raw)
  To: netdev; +Cc: linux-sctp, Neil Horman, Vlad Yasevich

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

This issue exists since before git import, so I can't put a Fixes tag.
Also, that said, probably not worth queueing it to stable.
Thanks

 include/net/sctp/sm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index efc01743b9d641bf6b16a37780ee0df34b4ec698..bafe2a0ab9085f24e17038516c55c00cfddd02f4 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -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);
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-09-19 21:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 18:02 [PATCH net] sctp: fix SSN comparision Marcelo Ricardo Leitner
2016-09-15 18:02 ` Marcelo Ricardo Leitner
2016-09-16 13:13 ` Neil Horman
2016-09-16 13:13   ` Neil Horman
2016-09-16 13:33 ` David Laight
2016-09-16 13:40 ` Marcelo Ricardo Leitner
2016-09-16 13:45 ` Marcelo Ricardo Leitner
2016-09-16 14:17 ` David Laight
2016-09-16 14:46 ` 'Marcelo Ricardo Leitner'
2016-09-16 14:53 ` 'Marcelo Ricardo Leitner'
2016-09-16 15:13 ` David Laight
2016-09-16 17:21 ` 'Marcelo Ricardo Leitner'
2016-09-17 14:00 ` David Miller
2016-09-17 14:00   ` David Miller
2016-09-19 10:41 ` David Laight
2016-09-19 16:02 ` 'Marcelo Ricardo Leitner'
2016-09-19 21:21 ` 'Marcelo Ricardo Leitner'

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.