Messages in this thread Patch in this message | | | Subject | [PATCH]2.6 test1 mm2 user.c race (?) | From | <> | Date | Mon, 28 Jul 2003 14:31:23 CEST |
| |
Andrew,
Trivial patch against possible smp race (?) in user.c or do we have bkl above ?
Regards, Fabian
diff -Naur orig/kernel/user.c edited/kernel/user.c --- orig/kernel/user.c 2003-07-14 05:32:42.000000000 +0200 +++ edited/kernel/user.c 2003-07-28 13:44:55.000000000 +0200 @@ -146,8 +146,11 @@ for(n = 0; n < UIDHASH_SZ; ++n) INIT_LIST_HEAD(uidhash_table + n); - /* Insert the root user immediately - init already runs with this */ + /* Insert the root user immediately (init already runs as root) */ + spin_lock(&uidhash_lock); uid_hash_insert(&root_user, uidhashentry(0)); + spin_unlock(&uidhash_lock); + return 0; }
___________________________________
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |