summaryrefslogtreecommitdiffstats
path: root/target/device/AMD/DBAu1500/kernel-patches/006_init_unshare.patch
blob: 8b756f8ad0670449d1cfd5eb15422cd1e70ce952 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- orig/kernel/fork.c	2006-03-21 01:41:50.000000000 -0700
+++ linux-2.6.16/kernel/fork.c	2006-03-21 01:41:50.000000000 -0700
@@ -773,7 +773,7 @@
 
 	/* This can race but the race causes us to copy when we don't
 	   need to and drop the copy */
-	if(atomic_read(&files->count) == 1)
+	if(atomic_read(&files->count) == 1 || current->pid == 1)
 	{
 		atomic_inc(&files->count);
 		return 0;