git: kernel - fix crash in smb mount

Nicolas Thery nth at
Sat Jul 10 02:04:11 PDT 2010

commit be36369df85afceebd0c8caca4b22f6e7a147f4f
Author: Nicolas Thery <nthery at>
Date:   Sat Jul 10 10:43:31 2010 +0200

    kernel - fix crash in smb mount
    The samba kernel-side daemon smbiod is created with
    Kernel threads created with kthread_create_compat() have no td_ucred, as
    other kernel threads, but have td_proc != NULL because this function
    under the hood forks the process 0.
    prison_replace_wildcard() was assuming that if td_proc != NULL it is
    dealing with a user thread that has a valid td_ucred thus causing a NULL
    ptr dereference when operating on kthread_create_compat()-threads.
    Reported-and-fixed-by: Tero Jaasko
    Dragonfly-bug: <>

Summary of changes:
 sys/kern/kern_jail.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list