atomic_set(&n_rcu_torture_mberror, 0); atomic_set(&n_rcu_torture_error, 0); 
rcu_torture_init(void){	int i;	int cpu;	int firsterr = 0;	/* Process args and tell the world that the torturer is on the job. */	if (nreaders >= 0)		nrealreaders = nreaders;	else		nrealreaders = 2 * num_online_cpus();	printk(KERN_ALERT TORTURE_FLAG	       "--- Start of test: nreaders=%d stat_interval=%d verbose=%d\n",	       nrealreaders, stat_interval, verbose);	fullstop = 0;	/* Set up the freelist. */	INIT_LIST_HEAD(&rcu_torture_freelist);	for (i = 0; i < sizeof(rcu_tortures) / sizeof(rcu_tortures[0]); i++) {		list_add_tail(&rcu_tortures[i].rtort_free,			      &rcu_torture_freelist);	}	/* Initialize the statistics so that each run gets its own numbers. */	rcu_torture_current = NULL;	rcu_torture_current_version = 0;	atomic_set(&n_rcu_torture_alloc, 0);	atomic_set(&n_rcu_torture_alloc_fail, 0);	atomic_set(&n_rcu_torture_free, 0);	for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)		atomic_set(&rcu_torture_wcount[i], 0);	for_each_cpu(cpu) {		for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {			per_cpu(rcu_torture_count, cpu)[i] = 0;			per_cpu(rcu_torture_batch, cpu)[i] = 0;		}	}	/* Start up the kthreads. */	VERBOSE_PRINTK_STRING("Creating rcu_torture_writer task");	writer_task = kthread_run(rcu_torture_writer, NULL,				  "rcu_torture_writer");	if (IS_ERR(writer_task)) {		firsterr = PTR_ERR(writer_task);		VERBOSE_PRINTK_ERRSTRING("Failed to create writer");		writer_task = NULL;		goto unwind;	}	reader_tasks = kmalloc(nrealreaders * sizeof(reader_tasks[0]),			       GFP_KERNEL);	if (reader_tasks == NULL) {		VERBOSE_PRINTK_ERRSTRING("out of memory");		firsterr = -ENOMEM;		goto unwind;	}	for (i = 0; i < nrealreaders; i++) {		VERBOSE_PRINTK_STRING("Creating rcu_torture_reader task");		reader_tasks[i] = kthread_run(rcu_torture_reader, NULL,					      "rcu_torture_reader");		if (IS_ERR(reader_tasks[i])) {			firsterr = PTR_ERR(reader_tasks[i]);			VERBOSE_PRINTK_ERRSTRING("Failed to create reader");			reader_tasks[i] = NULL;			goto unwind;		}	}	if (stat_interval > 0) {		VERBOSE_PRINTK_STRING("Creating rcu_torture_stats task");		stats_task = kthread_run(rcu_torture_stats, NULL,					"rcu_torture_stats");		if (IS_ERR(stats_task)) {			firsterr = PTR_ERR(stats_task);			VERBOSE_PRINTK_ERRSTRING("Failed to create stats");			stats_task = NULL;			goto unwind;		}	}	return 0;unwind:	rcu_torture_cleanup();	return firsterr;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/996417d2c4eb583e94553e4ede58974e0da1c38e/rcutorture.c/buggy/kernel/rcutorture.c