svn commit: r291401 - head/sys/boot/usb/storage
Zbigniew Bodek
zbb at FreeBSD.org
Fri Nov 27 18:16:11 UTC 2015
Author: zbb
Date: Fri Nov 27 18:16:10 2015
New Revision: 291401
URL: https://svnweb.freebsd.org/changeset/base/291401
Log:
Do not zero memory in umass_detach
The detach function is called very often, for example from
get_capacity function. We don't want to loose any pointers
here, so disable detaching for umass driver.
Submitted by: Wojciech Macek <wma at semihalf.com>
Obtained from: Semihalf
Sponsored by: Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4141
Modified:
head/sys/boot/usb/storage/umass_common.c
Modified: head/sys/boot/usb/storage/umass_common.c
==============================================================================
--- head/sys/boot/usb/storage/umass_common.c Fri Nov 27 18:14:45 2015 (r291400)
+++ head/sys/boot/usb/storage/umass_common.c Fri Nov 27 18:16:10 2015 (r291401)
@@ -82,6 +82,9 @@ umass_attach(device_t dev)
static int
umass_detach(device_t dev)
{
+
+#ifdef USB_DEBUG
memset(&umass_uaa, 0, sizeof(umass_uaa));
+#endif
return (0);
}
More information about the svn-src-head
mailing list