lkml.org 
[lkml]   [2003]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 04/14] USB speedtouch: add defensive memory barriers
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.202 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site