Commit:     98701d1b0fe98b477b53df89114e6862547f8107
Parent:     0f95b7fc839bc3272b1bf2325d8748a649bd3534
Author:     kalash nainwal <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:28:31 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:08 2007 -0700

    (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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/exec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index f1691cd..1ba85c7 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -100,6 +100,7 @@ int unregister_binfmt(struct linux_binfmt * fmt)
        while (*tmp) {
                if (fmt == *tmp) {
                        *tmp = fmt->next;
+                       fmt->next = NULL;
                        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to