PATCH: fix a race in the plugin api for ac97

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 14 Jul 2003 13:25:14 +0100


diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.22-pre5/drivers/sound/ac97_codec.c linux.22-pre5-ac1/drivers/sound/ac97_codec.c
--- linux.22-pre5/drivers/sound/ac97_codec.c 2003-07-14 12:27:39.000000000 +0100
+++ linux.22-pre5-ac1/drivers/sound/ac97_codec.c 2003-07-07 16:20:20.000000000 +0100
@@ -740,7 +740,6 @@
memset(codec, 0, sizeof(*codec));
spin_lock_init(&codec->lock);
INIT_LIST_HEAD(&codec->list);
- list_add(&codec->list, &codecs);
return codec;
}

@@ -869,6 +868,7 @@
*/

down(&codec_sem);
+ list_add(&codec->list, &codecs);

list_for_each(l, &codec_drivers) {
d = list_entry(l, struct ac97_driver, list);
-
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/