<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/dmapool.c, branch v3.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-09-18T17:39:16Z</updated>
<entry>
<title>Fix unbalanced mutex in dma_pool_create().</title>
<updated>2014-09-18T17:39:16Z</updated>
<author>
<name>Krzysztof Hałasa</name>
<email>khalasa@piap.pl</email>
</author>
<published>2014-09-18T13:12:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=153a9f131f50420b7ce008c94f1c6374cbc460d7'/>
<id>urn:sha1:153a9f131f50420b7ce008c94f1c6374cbc460d7</id>
<content type='text'>
dma_pool_create() needs to unlock the mutex in error case.  The bug was
introduced in the 3.16 by commit cc6b664aa26d ("mm/dmapool.c: remove
redundant NULL check for dev in dma_pool_create()")/

Signed-off-by: Krzysztof Hałasa &lt;khc@piap.pl&gt;
Cc: stable@vger.kernel.org  # v3.16
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/dmapool.c: reuse devres_release() to free resources</title>
<updated>2014-06-04T23:54:08Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2014-06-04T23:10:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=172cb4b3d49a1339dd67ee05e3f47972a70f556f'/>
<id>urn:sha1:172cb4b3d49a1339dd67ee05e3f47972a70f556f</id>
<content type='text'>
Instead of calling an additional routine in dmam_pool_destroy() rely on
what dmam_pool_release() is doing.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@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>mm/dmapool.c: remove redundant NULL check for dev in dma_pool_create()</title>
<updated>2014-06-04T23:54:04Z</updated>
<author>
<name>Daeseok Youn</name>
<email>daeseok.youn@gmail.com</email>
</author>
<published>2014-06-04T23:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc6b664aa26de93d9a3f99d4021a8d88b434ed06'/>
<id>urn:sha1:cc6b664aa26de93d9a3f99d4021a8d88b434ed06</id>
<content type='text'>
"dev" cannot be NULL because it is already checked before calling
dma_pool_create().

If dev ever was NULL, the code would oops in dev_to_node() after enabling
CONFIG_NUMA.

It is possible that some driver is using dev==NULL and has never been run
on a NUMA machine.  Such a driver is probably outdated, possibly buggy and
will need some attention if it starts triggering NULL derefs.

Signed-off-by: Daeseok Youn &lt;daeseok.youn@gmail.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: Fix printk typo in dmapool.c</title>
<updated>2014-05-05T13:44:47Z</updated>
<author>
<name>Hiroshige Sato</name>
<email>sato.vintage@gmail.com</email>
</author>
<published>2014-04-16T12:28:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5835f25117ef6a56144bfc6be98b5a3cb188bf7a'/>
<id>urn:sha1:5835f25117ef6a56144bfc6be98b5a3cb188bf7a</id>
<content type='text'>
Fix printk typo in dmapool.c

Signed-off-by: Hiroshige Sato &lt;sato.vintage@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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>
</feed>
