[PATCH] fix current->user->processes leak
Patch from: Eric Lammerts <eric@lammerts.org> Every time you do a loop mount, a kernel thread is started (those processes are called "loop0", "loop1", etc.). The problem is that when it starts, it's counted as one of your processes. Then, it's changed to be a root-owned process without correcting that count. Patch below fixes the problem. It moves the bookkeeping of changing current->user to a new function switch_uid() (which is now also used by exec_usermodehelper() in kmod.c). The patch is tested.
Showing
Please register or sign in to comment