* [PATCH] dma-buf: fix WARNING in dma_buf_vmap
@ 2025-12-20 19:22 Szymon Wilczek
2025-12-20 19:22 ` syzbot
2025-12-21 1:24 ` syzbot
0 siblings, 2 replies; 4+ messages in thread
From: Szymon Wilczek @ 2025-12-20 19:22 UTC (permalink / raw)
To: sumit.semwal, christian.koenig
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel,
syzkaller-bugs, Szymon Wilczek, syzbot+cd944c467e4d4bc24cf6
When a driver's vmap callback returns an error (e.g. -ENOMEM), dma_buf_vmap()
triggers a WARN_ON_ONCE(). This is incorrect as vmap operations can legitimately
fail due to resource exhaustion or other transient conditions, as documented.
Fix this by removing the WARN_ON_ONCE(). The error code is already correctly
propagated to the caller.
Reported-by: syzbot+cd944c467e4d4bc24cf6@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug\?extid\=4317d7108e14e5d56308
Signed-off-by: Szymon Wilczek <szymonwilczek@gmx.com>
---
drivers/dma-buf/dma-buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index edaa9e4ee4ae..14b55f67ee1c 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1525,7 +1525,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
ret = dmabuf->ops->vmap(dmabuf, &ptr);
- if (WARN_ON_ONCE(ret))
+ if (ret)
return ret;
dmabuf->vmap_ptr = ptr;
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dma-buf: fix WARNING in dma_buf_vmap
2025-12-20 19:22 [PATCH] dma-buf: fix WARNING in dma_buf_vmap Szymon Wilczek
@ 2025-12-20 19:22 ` syzbot
2025-12-21 1:24 ` syzbot
1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2025-12-20 19:22 UTC (permalink / raw)
To: szymonwilczek
Cc: christian.koenig, dri-devel, linaro-mm-sig, linux-kernel,
linux-media, sumit.semwal, syzkaller-bugs, szymonwilczek
> When a driver's vmap callback returns an error (e.g. -ENOMEM), dma_buf_vmap()
> triggers a WARN_ON_ONCE(). This is incorrect as vmap operations can legitimately
> fail due to resource exhaustion or other transient conditions, as documented.
>
> Fix this by removing the WARN_ON_ONCE(). The error code is already correctly
> propagated to the caller.
>
> Reported-by: syzbot+cd944c467e4d4bc24cf6@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug\?extid\=4317d7108e14e5d56308
> Signed-off-by: Szymon Wilczek <szymonwilczek@gmx.com>
> ---
> drivers/dma-buf/dma-buf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index edaa9e4ee4ae..14b55f67ee1c 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1525,7 +1525,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
> BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
>
> ret = dmabuf->ops->vmap(dmabuf, &ptr);
> - if (WARN_ON_ONCE(ret))
> + if (ret)
> return ret;
>
> dmabuf->vmap_ptr = ptr;
> --
> 2.52.0
>
I see the command but can't find the corresponding bug.
The email is sent to syzbot+HASH@syzkaller.appspotmail.com address
but the HASH does not correspond to any known bug.
Please double check the address.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dma-buf: fix WARNING in dma_buf_vmap
2025-12-20 19:22 [PATCH] dma-buf: fix WARNING in dma_buf_vmap Szymon Wilczek
2025-12-20 19:22 ` syzbot
@ 2025-12-21 1:24 ` syzbot
1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2025-12-21 1:24 UTC (permalink / raw)
To: szymonwilczek
Cc: christian.koenig, dri-devel, linaro-mm-sig, linux-kernel,
linux-media, sumit.semwal, syzkaller-bugs, szymonwilczek
> When a driver's vmap callback returns an error (e.g. -ENOMEM), dma_buf_vmap()
> triggers a WARN_ON_ONCE(). This is incorrect as vmap operations can legitimately
> fail due to resource exhaustion or other transient conditions, as documented.
>
> Fix this by removing the WARN_ON_ONCE(). The error code is already correctly
> propagated to the caller.
>
> Reported-by: syzbot+cd944c467e4d4bc24cf6@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug\?extid\=4317d7108e14e5d56308
> Signed-off-by: Szymon Wilczek <szymonwilczek@gmx.com>
> ---
> drivers/dma-buf/dma-buf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index edaa9e4ee4ae..14b55f67ee1c 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1525,7 +1525,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
> BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
>
> ret = dmabuf->ops->vmap(dmabuf, &ptr);
> - if (WARN_ON_ONCE(ret))
> + if (ret)
> return ret;
>
> dmabuf->vmap_ptr = ptr;
> --
> 2.52.0
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/syzkaller-bugs/20251220192210.399423-1-szymonwilczek%40gmx.com.
I see the command but can't find the corresponding bug.
The email is sent to syzbot+HASH@syzkaller.appspotmail.com address
but the HASH does not correspond to any known bug.
Please double check the address.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] dma-buf: fix WARNING in dma_buf_vmap
@ 2025-12-21 15:32 Szymon Wilczek
0 siblings, 0 replies; 4+ messages in thread
From: Szymon Wilczek @ 2025-12-21 15:32 UTC (permalink / raw)
To: sumit.semwal, christian.koenig
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel,
syzkaller-bugs, Szymon Wilczek, syzbot+4317d7108e14e5d56308
When a driver's vmap callback returns an error (e.g. -ENOMEM), dma_buf_vmap()
triggers a WARN_ON_ONCE(). This is incorrect as vmap operations can legitimately
fail due to resource exhaustion or other transient conditions, as documented.
Fix this by removing the WARN_ON_ONCE(). The error code is already correctly
propagated to the caller.
Reported-by: syzbot+4317d7108e14e5d56308@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=4317d7108e14e5d56308
Signed-off-by: Szymon Wilczek <swilczek.lx@gmail.com>
---
drivers/dma-buf/dma-buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index edaa9e4ee4ae..14b55f67ee1c 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1525,7 +1525,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
ret = dmabuf->ops->vmap(dmabuf, &ptr);
- if (WARN_ON_ONCE(ret))
+ if (ret)
return ret;
dmabuf->vmap_ptr = ptr;
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-21 15:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-20 19:22 [PATCH] dma-buf: fix WARNING in dma_buf_vmap Szymon Wilczek
2025-12-20 19:22 ` syzbot
2025-12-21 1:24 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2025-12-21 15:32 Szymon Wilczek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox