Page MenuHomeFreeBSD

zfs: fix panic due to tqid overflow
ClosedPublic

Authored by mjg on Oct 13 2020, 12:55 PM.
Tags
None
Referenced Files
F111111594: D26759.id78189.diff
Thu, Feb 27, 2:15 PM
Unknown Object (File)
Sun, Feb 23, 12:33 AM
Unknown Object (File)
Thu, Feb 20, 4:14 AM
Unknown Object (File)
Sun, Feb 9, 2:44 AM
Unknown Object (File)
Sat, Feb 8, 4:58 PM
Unknown Object (File)
Sat, Feb 8, 4:50 PM
Unknown Object (File)
Wed, Feb 5, 3:27 PM
Unknown Object (File)
Jan 23 2025, 2:21 AM
Subscribers

Details

Summary

The 32-bit counter eventually wraps to 0 which is a sentinel for invalid id.

Make it 64-bit on LP64 platforms and 0-check otherwise.

Note: Linux counterpart uses id stored per queue instead of a global.
I did not check going that way is feasible with the goal being the minimal fix doing the job.

Once this is sorted out I'll post a review on github.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Oct 13 2020, 12:55 PM

Makes sense to me. I just hope that situation of ID duplicate due to wraparound it too unlikely on 32-bit even considering taskq_dispatch_delay(). Though not sure who really used any 32bit platforms recently, even considering recent i386 KVA increase to 4GB.

This revision is now accepted and ready to land.Oct 13 2020, 4:04 PM
This revision was automatically updated to reflect the committed changes.