diff options
author | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-09-12 07:45:20 +0000 |
---|---|---|
committer | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-09-12 07:45:20 +0000 |
commit | ffbfc32cccf051b211b583abfe3d862bbfd07e80 (patch) | |
tree | 33799f5b40a56a61e6ea7a736fed4dabb817926c /sbin/scsi | |
parent | ba84b6ed65e09f2f63708aea245f6ea3920a30e4 (diff) |
Fix a race condition which would cause segfault due to the kernel
sending less (or more) data than expected.
We do a sysctl to know how much data should be read, and then we try to
read that amount, but there is a window between this two calls that
things can change, this makes sure we have an "atomic view" of data.
From Patrick Wildt, tested with over 7000 SAs, thanks.
ok deraadt
Diffstat (limited to 'sbin/scsi')
0 files changed, 0 insertions, 0 deletions