]> git.baikalelectronics.ru Git - kernel.git/commit
(re)register_binfmt returns with -EBUSY
authorkalash nainwal <kalash.nainwal@gmail.com>
Tue, 8 May 2007 07:28:31 +0000 (00:28 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:08 +0000 (11:15 -0700)
commit0c8b4ec37a4c2a9a689872b3753f6c9d44647b06
tree4ccfe162116056c1af41563ef4ea6c93bb7067f3
parentd06c39bd7594ba5e3367feabad5d97f5a871a5d6
(re)register_binfmt returns with -EBUSY

When a binary format is unregistered and re-registered, register_binfmt
fails with -EBUSY.  The reason is that unregister_binfmt does not set
fmt->next to NULL, and seeing (fmt->next != NULL), register_binfmt fails
with -EBUSY.

One can find his way around by explicitly setting fmt->next to NULL after
unregistering, but that is kind of unclean (one should better be using only
the interfaces, and not the interal members, isn't it?)

Attached one-liner can fix it.

Signed-off-by: Kalash Nainwal <kalash.nainwal@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c