Skip to content

Commit d9df72c

Browse files
SurajSonawane2415jgunthorpe
authored andcommitted
iommu: iommufd: fix WARNING in iommufd_device_unbind
Fix an issue detected by syzbot: WARNING in iommufd_device_unbind iommufd: Time out waiting for iommufd object to become free Resolve a warning in iommufd_device_unbind caused by a timeout while waiting for the shortterm_users reference count to reach zero. The existing 10-second timeout is insufficient in some scenarios, resulting in failures the above warning. Increase the timeout in iommufd_object_dec_wait_shortterm from 10 seconds to 60 seconds to allow sufficient time for the reference count to drop to zero. This change prevents premature timeouts and reduces the likelihood of warnings during iommufd_device_unbind. Fixes: 6f9c4d8 ("iommufd: Do not UAF during iommufd_put_object()") Link: https://patch.msgid.link/r/[email protected] Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=c92878e123785b1fa2db Tested-by: [email protected] Signed-off-by: Suraj Sonawane <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 11534b4 commit d9df72c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/iommufd/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static int iommufd_object_dec_wait_shortterm(struct iommufd_ctx *ictx,
104104
if (wait_event_timeout(ictx->destroy_wait,
105105
refcount_read(&to_destroy->shortterm_users) ==
106106
0,
107-
msecs_to_jiffies(10000)))
107+
msecs_to_jiffies(60000)))
108108
return 0;
109109

110110
pr_crit("Time out waiting for iommufd object to become free\n");

0 commit comments

Comments
 (0)