lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 08 Aug 2011 22:54:09 +0530
From:	"Koul, Vinod" <vinod.koul@...el.com>
To:	Hillf Danton <dhillf@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC patch] DMA engine/Langwell: release LLI pool

On Wed, 2011-07-27 at 21:24 +0800, Hillf Danton wrote:
> When releasing resources allocated before for DMA channel, checking LLI pool is
> added and it is reclaimed if still available.
> 
> Signed-off-by: Hillf Danton <dhillf@...il.com>
> ---
>  drivers/dma/intel_mid_dma.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
> index f653517..4c758fc 100644
> --- a/drivers/dma/intel_mid_dma.c
> +++ b/drivers/dma/intel_mid_dma.c
> @@ -833,6 +833,10 @@ static void
> intel_mid_dma_free_chan_resources(struct dma_chan *chan)
And this one, as well
>  	midc->descs_allocated = 0;
>  	list_for_each_entry_safe(desc, _desc, &midc->active_list, desc_node) {
>  		list_del(&desc->desc_node);
> +		if (desc->lli != NULL) {
> +			pci_pool_free(desc->lli_pool, desc->lli, desc->lli_phys);
> +			pci_pool_destroy(desc->lli_pool);
> +		}
>  		pci_pool_free(mid->dma_pool, desc, desc->txd.phys);
>  	}
>  	list_for_each_entry_safe(desc, _desc, &midc->free_list, desc_node) {
> @@ -841,6 +845,10 @@ static void
> intel_mid_dma_free_chan_resources(struct dma_chan *chan)
>  	}
>  	list_for_each_entry_safe(desc, _desc, &midc->queue, desc_node) {
>  		list_del(&desc->desc_node);
> +		if (desc->lli != NULL) {
> +			pci_pool_free(desc->lli_pool, desc->lli, desc->lli_phys);
> +			pci_pool_destroy(desc->lli_pool);
> +		}
>  		pci_pool_free(mid->dma_pool, desc, desc->txd.phys);
>  	}
>  	spin_unlock_bh(&midc->lock);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


-- 
~Vinod

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ