Robert Watson d2c205d5de A few locking fixes and cleanups to pfil hook registration,
unregistration, and execution:

- Add some brackets for clarity and trim a bit of vertical whitespace.
- Remove comments that may not contribute to clarity, such as "Lock"
  before acquiring a lock and "Get memory" before allocating memory.
- During hook registration, don't drop pfil_list_lock between checking
  for a duplicate and registering the hook, as this leaves a race
  condition by failing to enforce the "no duplicate hooks" invariant.
- Don't lock the hook during registration, since it's not yet in use.
- Document assumption that hooks will be quiesced before being
  unregistered.
- Don't write-lock hooks during removal because they are assumed
  quiesced.
- Rename "done" label to "locked_error" to be clear that it's an error
  path on the way out of hook execution.

MFC after:	pretty soon
2008-12-16 17:03:22 +00:00
..
2008-07-25 23:58:09 +00:00
2008-08-25 20:43:13 +00:00
2008-12-16 04:41:39 +00:00
2008-12-15 06:10:57 +00:00
2008-12-15 06:10:57 +00:00
2008-12-16 04:41:39 +00:00
2008-12-15 06:10:57 +00:00
2008-12-15 06:10:57 +00:00