summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2003-07-29 05:07:37 +0000
committerjmg <jmg@FreeBSD.org>2003-07-29 05:07:37 +0000
commit6c5f68638fb23d2cb0db92368a00ee2cac2a9d88 (patch)
treefd1361b477b1dca5f6df310144fb555bbf2d36ef /sys
parent763ea6d84f580d5cfcb43f29b71d3e4bfbb65468 (diff)
downloadFreeBSD-src-6c5f68638fb23d2cb0db92368a00ee2cac2a9d88.zip
FreeBSD-src-6c5f68638fb23d2cb0db92368a00ee2cac2a9d88.tar.gz
fix another bus_dma leak due to not having a size param for our bus_dma
allocation function. With this patch, it prevents continous growth of the devbuf memory pool. Tested with ssh <host> dd of=/dev/null < /dev/zero and vmstat -m | grep devbuf
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb_mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c
index 143ce2e..ae824e1 100644
--- a/sys/dev/usb/usb_mem.c
+++ b/sys/dev/usb/usb_mem.c
@@ -183,6 +183,8 @@ usb_block_allocmem(bus_dma_tag_t tag, size_t size, size_t align,
usbmem_callback, p, 0))
goto memfree;
+ /* XXX - override the tag, ok since we never free it */
+ p->tag = tag;
*dmap = p;
return (USBD_NORMAL_COMPLETION);
OpenPOWER on IntegriCloud