Module Name:    src
Committed By:   riastradh
Date:           Sun Mar 13 17:21:29 UTC 2022

Modified Files:
        src/sys/kern: kern_proc.c

Log Message:
kern: Fix ordering of loads for pid_table and pid_tbl_mask.

This introduces a load-acquire where there was none before.  This is
a simple correctness change.  We could avoid the load-acquire, and
use only load-consume, if we used a pointer indirection for _both_
pid_table and pid_tbl_mask.  Takes a little more work, and probably
costs an additional cache line of memory traffic, but might be worth
it to avoid the load-acquire for pid lookup.

Reported-by: syzbot+c49e405d0b977aeed...@syzkaller.appspotmail.com
Reported-by: syzbot+1c88ee7086f93607c...@syzkaller.appspotmail.com
Reported-by: syzbot+da4e9ed1319b75fe2...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/kern/kern_proc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to