2004-10-22 20:26:36

by Jesse Barnes

[permalink] [raw]
Subject: BUG_ONs in signal.c?

I recently saw a bug where someone hit the BUG_ON in signal.c after the
do_coredump code (in my kernel "kernel BUG at signal.c:1614"). After looking
at it a bit, it seems that we drop the sighand lock prior to calling into the
core dump routine, which leaves the task vulnerable to having it's group_exit
or group_exit_code changed either during the coredump or shortly after,
causing one of the BUG_ONs to trip (in this particular case it was the
group_exit_code != code check). Are these BUG_ON checks necessary anymore?
Or should we be holding the sighand lock all the way until we call do_exit or
do_group_exit? Or something else?

Thanks,
Jesse