Opened 10 years ago

Closed 10 years ago

#5027 closed bug (fixed)

Generic Syscall Unsafe

Reported by: bonefish Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

There's a race condition between the call to the generic syscall hook and unregister_generic_syscall(). The hook function can be called anytime after the generic syscall has already been unregistered, even after the module implementing the hook has already been unloaded (inevitably crashing the kernel).

The obvious solution presenting itself: unregister_generic_syscall() could wait until all hook invocations are done. This would require an additional "valid" flag (cleared by unregister, checked before calling the hook), call counter, and condition variable for each hook.

Change History (2)

comment:1 Changed 10 years ago by axeld

Status: newassigned

comment:2 Changed 10 years ago by axeld

Resolution: fixed
Status: assignedclosed

Fixed in hrev34233, although without the conditional variable for now.

Note: See TracTickets for help on using tickets.