summaryrefslogtreecommitdiff
path: root/include/linux/pps_kernel.h
diff options
context:
space:
mode:
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>2026-06-08 18:12:57 +0300
committerAlex Williamson <alex@shazbot.org>2026-06-10 23:33:05 +0300
commit4ec5e932e636896e97e4c6a8205b0ac76d52421a (patch)
treeeffa6bb05f342bc6ea325bf211762c8a01fbc533 /include/linux/pps_kernel.h
parenta26b499b757cfc8bbff1088bb1b844639e250893 (diff)
downloadlinux-4ec5e932e636896e97e4c6a8205b0ac76d52421a.tar.xz
vfio/qat: fix f_pos race in qat_vf_resume_write()
qat_vf_resume_write() checks filp->f_pos before taking migf->lock, but copies into the migration-state buffer after taking the lock and re-reading the shared file position. Two concurrent writers could therefore pass the bounds check with the old offset, then have the second writer copy after the first advanced f_pos, writing past the end of the migration-state buffer. Take migf->lock before doing the boundary checks. Fixes: bb208810b1ab ("vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices") Reviewed-by: Ahsan Atta <ahsan.atta@intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Link: https://lore.kernel.org/r/20260608151317.136613-1-giovanni.cabiddu@intel.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'include/linux/pps_kernel.h')
0 files changed, 0 insertions, 0 deletions