summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/system.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2013-07-04 05:53:05 +0000
committeralfred <alfred@FreeBSD.org>2013-07-04 05:53:05 +0000
commit9bc7dd48973bda8317ae62754ee93073f9a1b70f (patch)
tree9e630f5b66d80f0b9f465a4426e81fec7808120e /lib/libc/stdlib/system.c
parent4afc69bc7618a2445997ba51f65a74a54d461acb (diff)
downloadFreeBSD-src-9bc7dd48973bda8317ae62754ee93073f9a1b70f.zip
FreeBSD-src-9bc7dd48973bda8317ae62754ee93073f9a1b70f.tar.gz
The change in r236456 (atomic_store_rel not locked) exposed a bug
in the ithread code where we could lose ithread interrupts if intr_event_schedule_thread() is called while the ithread is already running. Effectively memory writes could be ordered incorrectly such that the unatomic write of 0 to ithd->it_need (in ithread_loop) could be delayed until after it was set to be triggered again by intr_event_schedule_thread(). This was particularly a big problem for CAM because CAM optimizes scheduling of ithreads such that it only signals camisr() when it queues to an empty queue. This means that additional completion events would not unstick CAM and quickly lead to a complete lockup of the CAM stack. To fix this use atomics in all places where ithd->it_need is accessed. Submitted by: delphij, mav Obtained from: TrueOS, iXsystems MFC After: 1 week
Diffstat (limited to 'lib/libc/stdlib/system.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud