]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipmi: Fix sequence number handling
authorCorey Minyard <cminyard@mvista.com>
Mon, 14 Nov 2016 16:11:30 +0000 (10:11 -0600)
committerCorey Minyard <cminyard@mvista.com>
Fri, 25 Nov 2016 00:09:49 +0000 (18:09 -0600)
commita24b5dd5eda73b956da27031cefbe4374b6af2bc
tree1bf0de702daf23de1858fd1b757398623430f125
parent94671710183c3f5eed7cf33f73600c836e4777fd
ipmi: Fix sequence number handling

The IPMI message handler uses a message id that the lower-layer
preserved to track the sequence number of the message.  The macros
that handled these sequence numbers were somewhat broken as they
could result in sequence number truncation and they were not
doing an "and" of the proper number of bits.

I think this actually is not a problem, because the truncation
should be harmless and the improper "and" didn't hurt anything
because sequence number generation used the same improper "and"
and wouldn't generate a sequence number that would get
truncated wrong.  However, it should be fixed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c