Thread (8 messages) 8 messages, 2 authors, 2018-06-26

Re: [PATCH for-rc 3/3] IB/hfi1: Fix incorrect mixing of ERR_PTR and NULL return values

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2018-06-26 20:38:01
Also in: linux-rdma

On Tue, Jun 26, 2018 at 11:19:19AM -0400, Dennis Dalessandro wrote:
On 6/20/2018 12:29 PM, Dennis Dalessandro wrote:
quoted
From: Michael J. Ruhl <redacted>

The __get_txreq() function can return a pointer, ERR_PTR(-EBUSY),
or NULL.  All of the relevant call sites look for IS_ERR, so the
NULL return would lead to a NULL pointer exception.

Do not use the ERR_PTR mechanism for this function.

Update all call sites to handle the return value correctly.

Clean up error paths to reflect return value.

cc: <redacted> # 4.9.x+
Reported-by: Dan Carpenter <redacted>
Reviewed-by: Mike Marciniszyn <redacted>
Reviewed-by: Kamenee Arumugam <redacted>
Signed-off-by: Michael J. Ruhl <redacted>
Signed-off-by: Dennis Dalessandro <redacted>
Fixes: 45842abbb292 ("staging/rdma/hfi1: move txreq header code")
Okay, I applied this to for-rc

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