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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/20/2018 12:29 PM, Dennis Dalessandro wrote:
From: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>

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: <stable@xxxxxxxxxxxxxxx> # 4.9.x+
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
Reviewed-by: Kamenee Arumugam <kamenee.arumugam@xxxxxxxxx>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>

Fixes: 45842abbb292 ("staging/rdma/hfi1: move txreq header code")

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux