<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/dmapool.c, branch v3.10.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/mm/dmapool.c?h=v3.10.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/mm/dmapool.c?h=v3.10.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-12T01:22:24Z</updated>
<entry>
<title>dmapool: make DMAPOOL_DEBUG detect corruption of free marker</title>
<updated>2012-12-12T01:22:24Z</updated>
<author>
<name>Matthieu CASTET</name>
<email>matthieu.castet@parrot.com</email>
</author>
<published>2012-12-12T00:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5de55b265a13bc263c823bbe05d87d2c5e785f6f'/>
<id>urn:sha1:5de55b265a13bc263c823bbe05d87d2c5e785f6f</id>
<content type='text'>
This can help to catch the case where hardware is writing after dma free.

[akpm@linux-foundation.org: tidy code, fix comment, use sizeof(page-&gt;offset), use pr_err()]
Signed-off-by: Matthieu Castet &lt;matthieu.castet@parrot.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls</title>
<updated>2012-12-11T08:28:08Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2012-11-07T14:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=387870f2d6d679746020fa8e25ef786ff338dc98'/>
<id>urn:sha1:387870f2d6d679746020fa8e25ef786ff338dc98</id>
<content type='text'>
dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag,
regardless the flags provided by the caller. This causes excessive
pruning of emergency memory pools without any good reason. Additionaly,
on ARM architecture any driver which is using dmapools will sooner or
later  trigger the following error:
"ERROR: 256 KiB atomic DMA coherent pool is too small!
Please increase it with coherent_pool= kernel parameter!".
Increasing the coherent pool size usually doesn't help much and only
delays such error, because all GFP_ATOMIC DMA allocations are always
served from the special, very limited memory pool.

This patch changes the dmapool code to correctly use gfp flags provided
by the dmapool caller.

Reported-by: Soeren Moch &lt;smoch@web.de&gt;
Reported-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Tested-by: Soeren Moch &lt;smoch@web.de&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>mm: fix implicit stat.h usage in dmapool.c</title>
<updated>2011-10-31T13:20:12Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-10-16T06:03:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c77509c542927ee2a3c8812fad84957e51bf67d'/>
<id>urn:sha1:7c77509c542927ee2a3c8812fad84957e51bf67d</id>
<content type='text'>
The removal of the implicitly everywhere module.h and its child includes
will reveal this implicit stat.h usage:

mm/dmapool.c:108: error: ‘S_IRUGO’ undeclared here (not in a function)

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>mm: Map most files to use export.h instead of module.h</title>
<updated>2011-10-31T13:20:12Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-10-16T06:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b95f1b31b75588306e32b2afd32166cad48f670b'/>
<id>urn:sha1:b95f1b31b75588306e32b2afd32166cad48f670b</id>
<content type='text'>
The files changed within are only using the EXPORT_SYMBOL
macro variants.  They are not using core modular infrastructure
and hence don't need module.h but only the export.h header.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>devres: fix possible use after free</title>
<updated>2011-07-26T03:57:14Z</updated>
<author>
<name>Maxin B John</name>
<email>maxin.john@gmail.com</email>
</author>
<published>2011-07-26T00:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae891a1b93bf62e9aaa116a7a71312375047fc9f'/>
<id>urn:sha1:ae891a1b93bf62e9aaa116a7a71312375047fc9f</id>
<content type='text'>
devres uses the pointer value as key after it's freed, which is safe but
triggers spurious use-after-free warnings on some static analysis tools.
Rearrange code to avoid such warnings.

Signed-off-by: Maxin B. John &lt;maxin.john@gmail.com&gt;
Reviewed-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/dmapool.c: use TASK_UNINTERRUPTIBLE in dma_pool_alloc()</title>
<updated>2011-01-14T01:32:48Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2011-01-13T23:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=684265d4a30f133162f06ddb2e5010608e60e4bb'/>
<id>urn:sha1:684265d4a30f133162f06ddb2e5010608e60e4bb</id>
<content type='text'>
As it stands this code will degenerate into a busy-wait if the calling task
has signal_pending().

Cc: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/dmapool.c: take lock only once in dma_pool_free()</title>
<updated>2011-01-14T01:32:48Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eike-kernel@sf-tec.de</email>
</author>
<published>2011-01-13T23:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=84bc227d7fde049a568cd58a5610613feedc0dff'/>
<id>urn:sha1:84bc227d7fde049a568cd58a5610613feedc0dff</id>
<content type='text'>
dma_pool_free() scans for the page to free in the pool list holding the
pool lock.  Then it releases the lock basically to acquire it immediately
again.  Modify the code to only take the lock once.

This will do some additional loops and computations with the lock held in
if memory debugging is activated.  If it is not activated the only new
operations with this lock is one if and one substraction.

Signed-off-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: add a might_sleep_if() to dma_pool_alloc()</title>
<updated>2010-10-26T23:52:08Z</updated>
<author>
<name>Dima Zavin</name>
<email>dima@android.com</email>
</author>
<published>2010-10-26T21:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ea05c8444e451f1cfbf78c68733e717ad7b8602b'/>
<id>urn:sha1:ea05c8444e451f1cfbf78c68733e717ad7b8602b</id>
<content type='text'>
Buggy drivers (e.g.  fsl_udc) could call dma_pool_alloc from atomic
context with GFP_KERNEL.  In most instances, the first pool_alloc_page
call would succeed and the sleeping functions would never be called.  This
allowed the buggy drivers to slip through the cracks.

Add a might_sleep_if() checking for __GFP_WAIT in flags.

Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dmapools: protect page_list walk in show_pools()</title>
<updated>2009-07-01T01:56:00Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2009-06-30T18:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c49568235dd7b4a2ffad63aa950562f4ffb9455f'/>
<id>urn:sha1:c49568235dd7b4a2ffad63aa950562f4ffb9455f</id>
<content type='text'>
show_pools() walks the page_list of a pool w/o protection against the list
modifications in alloc/free.  Take pool-&gt;lock to avoid stomping into
nirvana.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dmapool: enable debugging for CONFIG_SLUB_DEBUG_ON too</title>
<updated>2008-04-28T15:58:20Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2008-04-28T09:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5ee5befa75e33e55d34584ad10286c5005cb1de'/>
<id>urn:sha1:b5ee5befa75e33e55d34584ad10286c5005cb1de</id>
<content type='text'>
Previously it was only enabled for CONFIG_DEBUG_SLAB.

Not hooked into the slub runtime debug configuration, so you currently only
get it with CONFIG_SLUB_DEBUG_ON, not plain CONFIG_SLUB_DEBUG

Acked-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
