dev->need_exit = 1; 
set_bit(W1_MASTER_NEED_EXIT, &dev->flags); 
int w1_add_master_device(struct w1_bus_master *master){	struct w1_master *dev;	int retval = 0;	struct w1_netlink_msg msg;        /* validate minimum functionality */        if (!(master->touch_bit && master->reset_bus) &&            !(master->write_bit && master->read_bit))        {           printk(KERN_ERR "w1_add_master_device: invalid function set\n");           return(-EINVAL);        }	dev = w1_alloc_dev(w1_ids++, w1_max_slave_count, w1_max_slave_ttl, &w1_driver, &w1_device);	if (!dev)		return -ENOMEM;	dev->kpid = kernel_thread(&w1_process, dev, 0);	if (dev->kpid < 0) {		dev_err(&dev->dev,			 "Failed to create new kernel thread. err=%d\n",			 dev->kpid);		retval = dev->kpid;		goto err_out_free_dev;	}	retval =  w1_create_master_attributes(dev);	if (retval)		goto err_out_kill_thread;	memcpy(dev->bus_master, master, sizeof(struct w1_bus_master));	dev->initialized = 1;	spin_lock(&w1_mlock);	list_add(&dev->w1_master_entry, &w1_masters);	spin_unlock(&w1_mlock);	msg.id.mst.id = dev->id;	msg.id.mst.pid = dev->kpid;	msg.type = W1_MASTER_ADD;	w1_netlink_send(dev, &msg);	return 0;err_out_kill_thread:	dev->need_exit = 1;	if (kill_proc(dev->kpid, SIGTERM, 1))		dev_err(&dev->dev,			 "Failed to send signal to w1 kernel thread %d.\n",			 dev->kpid);	wait_for_completion(&dev->dev_exited);err_out_free_dev:	w1_free_dev(dev);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6adf87bd7b7832105b9c6bc08adf6a4d229f1e79/w1_int.c/buggy/drivers/w1/w1_int.c