[PATCH 04/14] USB speedtouch: add defensive memory barriers

Duncan Sands (baldrick@wanadoo.fr)
Wed, 21 May 2003 00:55:45 +0200


Defend against future maintainers.

speedtch.c | 2 ++
1 files changed, 2 insertions(+)

diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c
--- a/drivers/usb/misc/speedtch.c Wed May 21 00:40:14 2003
+++ b/drivers/usb/misc/speedtch.c Wed May 21 00:40:14 2003
@@ -1220,6 +1220,7 @@

finish:
/* ready for ATM callbacks */
+ wmb ();
instance->atm_dev->dev_data = instance;

usb_set_intfdata (intf, instance);
@@ -1358,6 +1359,7 @@
for (i = 0; i < UDSL_NUM_SND_BUFS; i++)
kfree (instance->send_buffers [i].base);

+ wmb ();
instance->usb_dev = NULL;

/* ATM finalize */

-
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/