<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/regmap/regmap-debugfs.c, branch v5.3</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=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-05-20T14:23:29Z</updated>
<entry>
<title>regmap: debugfs: Fix memory leak in regmap_debugfs_init</title>
<updated>2019-05-20T14:23:29Z</updated>
<author>
<name>Daniel Baluta</name>
<email>daniel.baluta@nxp.com</email>
</author>
<published>2019-05-17T13:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2899872b627e99b7586fe3b6c9f861da1b4d5072'/>
<id>urn:sha1:2899872b627e99b7586fe3b6c9f861da1b4d5072</id>
<content type='text'>
As detected by kmemleak running on i.MX6ULL board:

nreferenced object 0xd8366600 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937370 (age 933.220s)
  hex dump (first 32 bytes):
    64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72  dummy-iomuxc-gpr
    40 32 30 65 34 30 30 30 00 e3 f3 ab fe d1 1b dd  @20e4000........
  backtrace:
    [&lt;b0402aec&gt;] kasprintf+0x2c/0x54
    [&lt;a6fbad2c&gt;] regmap_debugfs_init+0x7c/0x31c
    [&lt;9c8d91fa&gt;] __regmap_init+0xb5c/0xcf4
    [&lt;5b1c3d2a&gt;] of_syscon_register+0x164/0x2c4
    [&lt;596a5d80&gt;] syscon_node_to_regmap+0x64/0x90
    [&lt;49bd597b&gt;] imx6ul_init_machine+0x34/0xa0
    [&lt;250a4dac&gt;] customize_machine+0x1c/0x30
    [&lt;2d19fdaf&gt;] do_one_initcall+0x7c/0x398
    [&lt;e6084469&gt;] kernel_init_freeable+0x328/0x448
    [&lt;168c9101&gt;] kernel_init+0x8/0x114
    [&lt;913268aa&gt;] ret_from_fork+0x14/0x20
    [&lt;ce7b131a&gt;] 0x0

Root cause is that map-&gt;debugfs_name is allocated using kasprintf
and then the pointer is lost by assigning it other memory address.

Reported-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: add proper SPDX identifiers on files that did not have them.</title>
<updated>2019-04-25T19:22:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-04-25T18:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37613fa5b762a73073de3c2e23baa4a1da337e71'/>
<id>urn:sha1:37613fa5b762a73073de3c2e23baa4a1da337e71</id>
<content type='text'>
There were a few files in the regmap code that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Also, as Mark loves // comment markers, convert all of the headers to be
the same to make things look consistent :)

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Jump to the next readable register</title>
<updated>2019-03-20T17:13:31Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanureal@opensource.cirrus.com</email>
</author>
<published>2019-03-19T09:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc6a8d69ba624f0ad7a09ed095b7bd4b86476489'/>
<id>urn:sha1:cc6a8d69ba624f0ad7a09ed095b7bd4b86476489</id>
<content type='text'>
Improve the speed of the loop jumping to the next
available register

Signed-off-by: Lucas Tanure &lt;tanureal@opensource.cirrus.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Tested-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Replace code by already existing function</title>
<updated>2019-03-19T13:08:41Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanureal@opensource.cirrus.com</email>
</author>
<published>2019-03-19T09:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1c67d65df0b5a3858741a144cd43f8e62c5c175'/>
<id>urn:sha1:a1c67d65df0b5a3858741a144cd43f8e62c5c175</id>
<content type='text'>
Signed-off-by: Lucas Tanure &lt;tanureal@opensource.cirrus.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: convert to DEFINE_SHOW_ATTRIBUTE</title>
<updated>2018-12-17T19:06:13Z</updated>
<author>
<name>Yangtao Li</name>
<email>tiny.windzz@gmail.com</email>
</author>
<published>2018-12-15T08:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=580d48573c43211fe51f411d484dbb693cc93f7c'/>
<id>urn:sha1:580d48573c43211fe51f411d484dbb693cc93f7c</id>
<content type='text'>
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li &lt;tiny.windzz@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Improve warning message on debugfs_create_dir() failure</title>
<updated>2018-03-06T14:49:28Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-03-06T02:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59dd2a85040103e95b1c87b1b920d357ee91dada'/>
<id>urn:sha1:59dd2a85040103e95b1c87b1b920d357ee91dada</id>
<content type='text'>
Currently when debugfs_create_dir() fails we receive a warning message
that provides no indication as to what was the directory entry that
failed to be created.

Improve the warning message by printing the directory name that failed
in order to help debugging.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Free map-&gt;debugfs_name when debugfs_create_dir() failed</title>
<updated>2018-03-06T14:20:50Z</updated>
<author>
<name>Jeffy Chen</name>
<email>jeffy.chen@rock-chips.com</email>
</author>
<published>2018-03-06T11:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17cf46cfe975f1dd04db6bd38398923846512d49'/>
<id>urn:sha1:17cf46cfe975f1dd04db6bd38398923846512d49</id>
<content type='text'>
Free map-&gt;debugfs_name when debugfs_create_dir() failed to avoid memory
leak.

Signed-off-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Don't leak dummy names</title>
<updated>2018-03-05T20:26:51Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2018-03-05T20:26:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46589e9c753b7c905e8671a89cbb9728f3b99855'/>
<id>urn:sha1:46589e9c753b7c905e8671a89cbb9728f3b99855</id>
<content type='text'>
When allocating dummy names we need to store a pointer to the string we
allocate so that we don't leak it on free.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: debugfs: Disambiguate dummy debugfs file name</title>
<updated>2018-03-05T19:23:26Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2018-03-05T18:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a430ab205d29e7d1537b220fcf989b8080d8267f'/>
<id>urn:sha1:a430ab205d29e7d1537b220fcf989b8080d8267f</id>
<content type='text'>
Since commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
allows the usage of regmap debugfs even when there is no device
associated, which causes several warnings like this:

(NULL device *): Failed to create debugfs directory

This happens when the debugfs file name is 'dummy'.

The first dummy debugfs creation works fine, but subsequent creations
fail as they have all the same name.

Disambiguate the 'dummy' debugfs file name by adding a suffix entry,
so that the names become dummy0, dummy1, dummy2, etc.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Allow missing device in regmap_name_read_file()</title>
<updated>2018-02-20T12:07:43Z</updated>
<author>
<name>David Lechner</name>
<email>david@lechnology.com</email>
</author>
<published>2018-02-19T21:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12ae3808c160b7be0de3c633ac4cbe8c5f2937bf'/>
<id>urn:sha1:12ae3808c160b7be0de3c633ac4cbe8c5f2937bf</id>
<content type='text'>
This fixes a possible NULL pointer dereference oops in
regmap_name_read_file() when the regmap does not have a device
associated with it. For example syscon regmaps retrieved with
syscon_regmap_lookup_by_compatible() don't have a device.

Signed-off-by: David Lechner &lt;david@lechnology.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
