Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys Pull up following revision(s) (requested by skrll in ...
details: https://anonhg.NetBSD.org/src/rev/8fde0fbbf704
branches: netbsd-8
changeset: 745227:8fde0fbbf704
user: martin <martin%NetBSD.org@localhost>
date: Tue Feb 25 18:52:44 2020 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #1507):
sys/dev/usb/ohci.c: revision 1.296
sys/dev/usb/uhci.c: revision 1.294
sys/external/bsd/dwc2/dwc2.c: revision 1.72
sys/arch/mips/adm5120/dev/ahci.c: revision 1.21
sys/dev/usb/ehci.c: revision 1.274
Fix a memory leak. Spotted by nat@
diffstat:
sys/arch/mips/adm5120/dev/ahci.c | 7 +++++--
sys/dev/usb/ehci.c | 8 +++++---
sys/dev/usb/ohci.c | 6 ++++--
sys/dev/usb/uhci.c | 5 +++--
sys/external/bsd/dwc2/dwc2.c | 8 ++++++--
5 files changed, 23 insertions(+), 11 deletions(-)
diffs (149 lines):
diff -r c980ea74c17e -r 8fde0fbbf704 sys/arch/mips/adm5120/dev/ahci.c
--- a/sys/arch/mips/adm5120/dev/ahci.c Thu Feb 20 14:32:21 2020 +0000
+++ b/sys/arch/mips/adm5120/dev/ahci.c Tue Feb 25 18:52:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahci.c,v 1.14 2017/06/01 02:45:06 chs Exp $ */
+/* $NetBSD: ahci.c,v 1.14.2.1 2020/02/25 18:52:44 martin Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.14 2017/06/01 02:45:06 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.14.2.1 2020/02/25 18:52:44 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -922,6 +922,9 @@
usb_transfer_complete(xfer);
mutex_exit(&sc->sc_lock);
+
+ usb_freemem(&sc->sc_bus, &reqdma);
+
return USBD_NORMAL_COMPLETION;
}
diff -r c980ea74c17e -r 8fde0fbbf704 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Thu Feb 20 14:32:21 2020 +0000
+++ b/sys/dev/usb/ehci.c Tue Feb 25 18:52:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.254.8.6 2018/09/28 08:33:43 martin Exp $ */
+/* $NetBSD: ehci.c,v 1.254.8.7 2020/02/25 18:52:44 martin Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254.8.6 2018/09/28 08:33:43 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254.8.7 2020/02/25 18:52:44 martin Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -3831,7 +3831,7 @@
ehci_device_ctrl_close(struct usbd_pipe *pipe)
{
ehci_softc_t *sc = EHCI_PIPE2SC(pipe);
- /*struct ehci_pipe *epipe = EHCI_PIPE2EPIPE(pipe);*/
+ struct ehci_pipe * const epipe = EHCI_PIPE2EPIPE(pipe);
EHCIHIST_FUNC(); EHCIHIST_CALLED();
@@ -3840,6 +3840,8 @@
DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0);
ehci_close_pipe(pipe, sc->sc_async_head);
+
+ usb_freemem(&sc->sc_bus, &epipe->ctrl.reqdma);
}
/*
diff -r c980ea74c17e -r 8fde0fbbf704 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Thu Feb 20 14:32:21 2020 +0000
+++ b/sys/dev/usb/ohci.c Tue Feb 25 18:52:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.273.6.5 2019/08/12 17:19:02 martin Exp $ */
+/* $NetBSD: ohci.c,v 1.273.6.6 2020/02/25 18:52:44 martin Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.273.6.5 2019/08/12 17:19:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.273.6.6 2020/02/25 18:52:44 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -2929,6 +2929,8 @@
DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0);
ohci_close_pipe(pipe, sc->sc_ctrl_head);
ohci_free_std_locked(sc, opipe->tail.td);
+
+ usb_freemem(&sc->sc_bus, &opipe->ctrl.reqdma);
}
/************************/
diff -r c980ea74c17e -r 8fde0fbbf704 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Thu Feb 20 14:32:21 2020 +0000
+++ b/sys/dev/usb/uhci.c Tue Feb 25 18:52:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.275.2.5 2018/09/27 14:52:26 martin Exp $ */
+/* $NetBSD: uhci.c,v 1.275.2.6 2020/02/25 18:52:44 martin Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.275.2.5 2018/09/27 14:52:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.275.2.6 2020/02/25 18:52:44 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -2845,6 +2845,7 @@
uhci_free_std_locked(sc, upipe->ctrl.setup);
uhci_free_std_locked(sc, upipe->ctrl.stat);
+ usb_freemem(&sc->sc_bus, &upipe->ctrl.reqdma);
}
/* Abort a device interrupt request. */
diff -r c980ea74c17e -r 8fde0fbbf704 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Thu Feb 20 14:32:21 2020 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Tue Feb 25 18:52:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.46.2.4 2019/12/05 16:59:35 bouyer Exp $ */
+/* $NetBSD: dwc2.c,v 1.46.2.5 2020/02/25 18:52:44 martin Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.46.2.4 2019/12/05 16:59:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.46.2.5 2020/02/25 18:52:44 martin Exp $");
#include "opt_usb.h"
@@ -773,9 +773,13 @@
Static void
dwc2_device_ctrl_close(struct usbd_pipe *pipe)
{
+ struct dwc2_softc * const sc = DWC2_PIPE2SC(pipe);
+ struct dwc2_pipe * const dpipe = DWC2_PIPE2DPIPE(pipe);
DPRINTF("pipe=%p\n", pipe);
dwc2_close_pipe(pipe);
+
+ usb_freemem(&sc->sc_bus, &dpipe->req_dma);
}
Static void
Home |
Main Index |
Thread Index |
Old Index