Re: Panic during samba mount

看板DFBSD_bugs作者時間15年前 (2010/07/18 18:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
On 10.7.2010 12:06, Nicolas Thery wrote: > td is a samba kernel thread created in smb_iod_create() by calling > kthread_create_compat() which according to its comment is used only for samba. > > kthread_create_compat() forks process 0 so the resulting kernel thread is a bit > different from other kernel threads: td->td_ucred == NULL but td->td_proc != > NULL (it points to the forked process). This explains why the td_proc == NULL > check at the beginning of prison_replace_wildcard(), which is presumably there > for detecting kernel threads, fails. > > prison_remote_ip() already checks if td_ucred != NULL before dereferencing it > so your patch looks good and a committed it. In the longer term, changing > samba to create a lwkt is probably the way to go. Thank you for the analysis and fix. BR, -Tero
文章代碼(AID): #1CGjWdgt (DFBSD_bugs)
文章代碼(AID): #1CGjWdgt (DFBSD_bugs)