Potential NULL pointer deference in cxgbit

From: Yizhuo Zhai
Date: Mon Oct 07 2019 - 15:03:12 EST


Hi All:

drivers/target/iscsi/cxgbit/cxgbit_ddp.c:

Inside function cxgbit_ddp_sgl_check(), sg_next() could return NULL,
however, the return value of sg_next() is not checked and get
dereferenced. This could potentially be unsafe.

--
Kind Regards,

Yizhuo Zhai

Computer Science, Graduate Student
University of California, Riverside