iouringfs: Pet the watchdog during ProcessSubmissions.

This loop can take a long time. Since we're blocking on IO outside
Task.Block, we need to periodically check for interrupts and update
pet the watchdog.

Reported-by: syzbot+3fd282d7e4e5c83fc196@syzkaller.appspotmail.com
PiperOrigin-RevId: 494009269
This commit is contained in:
Rahat Mahmood
2022-12-08 15:23:00 -08:00
committed by gVisor bot
parent 110c3d76e4
commit a005752d88
+6
View File
@@ -337,6 +337,12 @@ func (fd *FileDescription) ProcessSubmissions(t *kernel.Task, toSubmit uint32, m
submitted := uint32(0)
for toSubmit > submitted {
// This loop can take a long time to process, so periodically check for
// interrupts. This also pets the watchdog.
if t.Interrupted() {
return -1, linuxerr.EINTR
}
if fetchRB {
view, err = fd.ioRingsBuf.view(fd.ioRings.SizeBytes())
if err != nil {