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

From: Duncan Sands (baldrick@wanadoo.fr)
Date: Tue May 20 2003 - 17:55:45 EST


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/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:42 EST