]> git.proxmox.com Git - mirror_zfs.git/commit
FreeBSD: fix panic due to tqid overflow
authorMateusz Guzik <mjguzik@gmail.com>
Wed, 14 Oct 2020 15:57:03 +0000 (17:57 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 16 Oct 2020 20:05:18 +0000 (13:05 -0700)
commit05613fa7a379a60076d8795518396fa82da00aea
tree14bf4d1681230c6e8341f4011a23333fcbc6b846
parent725c9e22ca369bb51050b823f0228b847c322678
FreeBSD: fix panic due to tqid overflow

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.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #11059
module/os/freebsd/spl/spl_taskq.c