Potential NULL pointer deference inata: sata_rcar

From: Yizhuo Zhai
Date: Thu Oct 10 2019 - 01:32:59 EST


Hi All:
In function sata_rcar_bmdma_fill_sg, macro for_each_sg uses sg_next(),
which could return NULL as "sg", however, there's no check before
dereferencing it (in sg_dma_address()), which is potentially unsafe.

--
Kind Regards,

Yizhuo Zhai

Computer Science, Graduate Student
University of California, Riverside