lkml.org 
[lkml]   [2018]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] rapidio: fix rio_dma_transfer error handling
From
Date
On 2018-04-12 11:06 AM, Ioan Nicu wrote:
> Some of the mport_dma_req structure members were initialized late
> inside the do_dma_request() function, just before submitting the
> request to the dma engine. But we have some error branches before
> that. In case of such an error, the code would return on the error
> path and trigger the calling of dma_req_free() with a req structure
> which is not completely initialized. This causes a NULL pointer
> dereference in dma_req_free().
>
> This patch fixes these error branches by making sure that all
> necessary mport_dma_req structure members are initialized in
> rio_dma_transfer() immediately after the request structure gets
> allocated.
>
> Signed-off-by: Ioan Nicu <ioan.nicu.ext@nokia.com>
> ---
> drivers/rapidio/devices/rio_mport_cdev.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
Acked-by: Alexandre Bounine <alex.bou9@gmail.com>

\
 
 \ /
  Last update: 2018-04-12 20:48    [W:0.619 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site