[PATCH] mtd: nand: qpic_common: use {cmd,data}_sgl_nitems for sg_init_table()
Konrad Dybcio
konrad.dybcio at oss.qualcomm.com
Mon Aug 11 03:36:30 PDT 2025
On 8/11/25 10:30 AM, Gabor Juhos wrote:
> Since commit ddaad4ad774d ("mtd: nand: qpic_common: prevent out of
> bounds access of BAM arrays"), the {cmd,data}_sgl_nitems members in
> the 'bam_transaction' structure are containing the number of elements
> in the cmd/data scatter-gather lists.
>
> Change the qcom_clear_bam_transaction() function to use these numbers
> while reinitializing the sg lists instead of recomputing the number of
> elements to make it less error prone.
>
> Signed-off-by: Gabor Juhos <j4g8y7 at gmail.com>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio at oss.qualcomm.com>
Konrad
More information about the linux-mtd
mailing list