[PATCH][V3] mt7601u: do not free dma_buf when ivp allocation fails

Kuba Kicinski kubakici at wp.pl
Thu Feb 25 15:36:31 PST 2016


On 25 February 2016 18:24:27 GMT-05:00, Colin King <colin.king at canonical.com> wrote:
>From: Colin Ian King <colin.king at canonical.com>
>
>If the allocation of ivp fails the error handling attempts to
>free an uninitialized dma_buf; this data structure just contains
>garbage on the stack, so the freeing will cause issues when the
>urb, buf and dma fields are free'd. Fix this by not free'ing the
>dma_buf if the ivp allocation fails.
>
>Signed-off-by: Colin Ian King <colin.king at canonical.com>

LGTM, thanks.




More information about the linux-arm-kernel mailing list