Clean up Ksplice's locking of the update.
commit4144902166f90e916a4e76964ca280a12a023415
authorTim Abbott <tabbott@mit.edu>
Wed, 17 Dec 2008 20:26:13 +0000 (17 15:26 -0500)
committerTim Abbott <tabbott@mit.edu>
Fri, 19 Dec 2008 17:17:45 +0000 (19 12:17 -0500)
tree72ab879f4f3b9e3a9a52f7828dc15a69339ed994
parent628c83fd4b77fa23cb3c0e3fa9ca2d35649a0ef6
Clean up Ksplice's locking of the update.

Updates, and in particular update->stage, was previously not protected
by any lock.  Since the ability of Ksplice to correctly operate
requires that module_mutex be held during the entire update
application process, use module_mutex as the lock protecting
update->stage.  The actual effect in terms of fraction of time holding
module_mutex is negligible, but now we don't have to worry about races
where e.g. two threads write applied to the stage file simultaneously.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
kmodsrc/ksplice.c