Skip to content

Commit

Permalink
KSP: added critical_{enter,exit} to lf_selfpatch
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Pinter <[email protected]>
  • Loading branch information
opntr committed Aug 14, 2014
1 parent 4a7f9f3 commit 5be2b1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/kern/kern_selfpatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,17 @@ lf_selfpatch(linker_file_t lf, int mod)
count = stop - start;
DBG("count: %d\n", count);

critical_enter();

for (patch = start; patch != stop; patch++) {
DBG("apply: %p\n", patch);
ret = lf_selfpatch_apply(lf, patch, mod);
if (ret != 0)
return (ret);
}

critical_exit();

#ifdef KSP_DEBUG
/*
* when selfpatch does not works, the system should crash
Expand Down

0 comments on commit 5be2b1d

Please sign in to comment.