unlock_kernel(); 
nfsd(struct svc_rqst *rqstp){	struct svc_serv	*serv = rqstp->rq_server;	struct fs_struct *fsp;	int		err;	struct nfsd_list me;	sigset_t shutdown_mask, allowed_mask;	/* Lock module and set up kernel thread */	lock_kernel();	daemonize("nfsd");	/* After daemonize() this kernel thread shares current->fs	 * with the init process. We need to create files with a	 * umask of 0 instead of init's umask. */	fsp = copy_fs_struct(current->fs);	if (!fsp) {		printk("Unable to start nfsd thread: out of memory\n");		goto out;	}	exit_fs(current);	current->fs = fsp;	current->fs->umask = 0;	siginitsetinv(&shutdown_mask, SHUTDOWN_SIGS);	siginitsetinv(&allowed_mask, ALLOWED_SIGS);	nfsdstats.th_cnt++;	lockd_up();				/* start lockd */	me.task = current;	list_add(&me.list, &nfsd_list);	unlock_kernel();	/*	 * We want less throttling in balance_dirty_pages() so that nfs to	 * localhost doesn't cause nfsd to lock up due to all the client's	 * dirty pages.	 */	current->flags |= PF_LESS_THROTTLE;	/*	 * The main request loop	 */	for (;;) {		/* Block all but the shutdown signals */		sigprocmask(SIG_SETMASK, &shutdown_mask, NULL);		/*		 * Find a socket with data available and call its		 * recvfrom routine.		 */		while ((err = svc_recv(serv, rqstp,				       60*60*HZ)) == -EAGAIN)			;		if (err < 0)			break;		update_thread_usage(atomic_read(&nfsd_busy));		atomic_inc(&nfsd_busy);		/* Lock the export hash tables for reading. */		exp_readlock();		/* Process request with signals blocked.  */		sigprocmask(SIG_SETMASK, &allowed_mask, NULL);		svc_process(serv, rqstp);		/* Unlock export hash tables */		exp_readunlock();		update_thread_usage(atomic_read(&nfsd_busy));		atomic_dec(&nfsd_busy);	}	if (err != -EINTR) {		printk(KERN_WARNING "nfsd: terminating on error %d\n", -err);	} else {		unsigned int	signo;		for (signo = 1; signo <= _NSIG; signo++)			if (sigismember(&current->pending.signal, signo) &&			    !sigismember(&current->blocked, signo))				break;		err = signo;	}	/* Clear signals before calling lockd_down() and svc_exit_thread() */	flush_signals(current);	lock_kernel();	/* Release lockd */	lockd_down();	/* Check if this is last thread */	if (serv->sv_nrthreads==1) {				printk(KERN_WARNING "nfsd: last server has exited\n");		if (err != SIG_NOCLEAN) {			printk(KERN_WARNING "nfsd: unexporting all filesystems\n");			nfsd_export_flush();		}		nfsd_serv = NULL;	        nfsd_racache_shutdown();	/* release read-ahead cache */		nfs4_state_shutdown();	}	list_del(&me.list);	nfsdstats.th_cnt --;out:	/* Release the thread */	svc_exit_thread(rqstp);	/* Release module */	module_put_and_exit(0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c4f92dba97f4e3aa757500896f87001569f4604b/nfssvc.c/buggy/fs/nfsd/nfssvc.c