Thread (3 messages) flat view 3 messages, 3 authors, 2018-08-07

Re: [PATCH] misc: ibmvsm: Fix wrong assignment of return code

From: Bryant G. Ly <hidden>
Date: 2018-08-07 14:22:14
Also in: lkml

On 8/7/18 7:28 AM, Michael Ellerman wrote:
"Bryant G. Ly" [off-list ref] writes:
quoted
From: "Bryant G. Ly" <redacted>

Currently the assignment is flipped and rc is always 0.
If you'd left rc uninitialised at the start of the function the compiler
would have caught it for you.

And what is the consequence of the bug? Nothing, complete system crash,
subtle data corruption?
The consequence would be that if the CRQ Registration failed the first time
due to not enough resources, it would never try to reset and try again. 

If it fails due to any other error then it would just fail the sending of the
crq init message, thus it would just wait for the client to init, which would
never happen. 

We would also have a memory leak since in the error case DMA would never get
un-mapped and the message queue never gets freed. 
Also this should be tagged:

Fixes: 0eca353e7ae7 ("misc: IBM Virtual Management Channel Driver (VMC)")

cheers
Yep, sorry I forgot to add the Fixes:..

-Bryant
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help