Page MenuHomeFreeBSD

vt: Consistently take vtbuf lock for mouse cursor position
Needs ReviewPublic

Authored by quentin.thebault_defenso.fr on Wed, Sep 23, 3:54 AM.
Tags
None
Referenced Files
F173284401: D59922.id187480.diff
Thu, Sep 24, 11:36 PM
F173277259: D59922.diff
Thu, Sep 24, 10:13 PM
Unknown Object (File)
Thu, Sep 24, 3:29 AM
Unknown Object (File)
Thu, Sep 24, 3:27 AM
Unknown Object (File)
Wed, Sep 23, 8:11 PM
Unknown Object (File)
Wed, Sep 23, 6:29 PM
Unknown Object (File)
Wed, Sep 23, 4:14 PM
Unknown Object (File)
Wed, Sep 23, 7:03 AM
Subscribers

Details

Reviewers
emaste
vexeduxr
Summary

vd_mx/vd_my and vd_mx_drawn/vd_my_drawn are read by vt_flush() under the
vtbuf lock, but the writers did not use that lock consistently, resulting
in races reported by KCSAN (see PR).

Take the vtbuf lock for every write and move the vd_mx_drawn/vd_my_drawn
read in vt_mark_mouse_position_as_dirty() inside the lock, matching
vt_flush().

PR: 298762
Sponsored by: Defenso

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77204
Build 74087: arc lint + arc unit