mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
misc: genwqe: handle a first DMA address of zero
genwqe_setup_sgl() uses zero as the initial previous DMA address. DMA address zero is valid, so a first entry at that address enters the merge path before last_s has been assigned and dereferences NULL. Only merge adjacent mappings after an SGL data entry has been created. Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com> Link: https://patch.msgid.link/20260630104923.53827-1-alhouseenyousef@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7a7a0d97d5
commit
d401772a9e
|
|
@ -413,7 +413,7 @@ int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
|
|||
size -= size_to_map;
|
||||
map_offs = 0;
|
||||
|
||||
if (prev_daddr == daddr) {
|
||||
if (last_s && prev_daddr == daddr) {
|
||||
u32 prev_len = be32_to_cpu(last_s->len);
|
||||
|
||||
/* pr_info("daddr combining: "
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user