<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/slimbus, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-23T11:40:15+00:00</updated>
<entry>
<title>slimbus: Fix out-of-bounds access in slim_slicesize()</title>
<updated>2018-04-23T11:40:15+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-04-08T09:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e33bbe69149b802c0c77bfb822685772f85388ca'/>
<id>urn:sha1:e33bbe69149b802c0c77bfb822685772f85388ca</id>
<content type='text'>
With gcc-4.1.2:

    slimbus/messaging.c: In function ‘slim_slicesize’:
    slimbus/messaging.c:186: warning: statement with no effect

Indeed, clamp() is a macro not operating in-place, but returning the
clamped value.  Hence the value is not clamped at all, which may lead to
an out-of-bounds access.

Fix this by assigning the clamped value.

Fixes: afbdcc7c384b0d44 ("slimbus: Add messaging APIs to slimbus framework")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: core: use put_device() instead of kfree()</title>
<updated>2018-03-15T16:55:52+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2018-03-09T14:09:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd329f028f1cd51c7623c326147af07c6d832193'/>
<id>urn:sha1:bd329f028f1cd51c7623c326147af07c6d832193</id>
<content type='text'>
Never directly free @dev after calling device_register(), even
if it returned an error! Always use put_device() to give up the
reference initialized.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: qcom: add HAS_IOMEM dependency</title>
<updated>2018-01-09T16:01:15+00:00</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2018-01-03T09:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc6b1f3d60ce65fa8f2074f5712e0627b25c028a'/>
<id>urn:sha1:fc6b1f3d60ce65fa8f2074f5712e0627b25c028a</id>
<content type='text'>
Below build failure was reported on UML,
ERROR: "devm_ioremap_resource" [drivers/slimbus/slim-qcom-ctrl.ko] undefined!
ERROR: "__ioread32_copy" [drivers/slimbus/slim-qcom-ctrl.ko] undefined!
ERROR: "__iowrite32_copy" [drivers/slimbus/slim-qcom-ctrl.ko] undefined!
ERROR: "devm_ioremap" [drivers/slimbus/slim-qcom-ctrl.ko] undefined!

This patch fixes it by making qcom slimbus depend on HAS_IOMEM, as
these are only defined when HAS_IOMEM is selected.

Reported-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: qcom: Fix return value check in qcom_slim_probe()</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-02T17:54:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff595a33485567cc0f192c7f4387d0d3b36a881a'/>
<id>urn:sha1:ff595a33485567cc0f192c7f4387d0d3b36a881a</id>
<content type='text'>
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: Fix missing unlock on error in slim_msg_response()</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-02T17:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8d2c8ea5720e22522903113100c5a16683c28be'/>
<id>urn:sha1:f8d2c8ea5720e22522903113100c5a16683c28be</id>
<content type='text'>
Add the missing unlock before return from function slim_msg_response()
in the error handling case.

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: Use GFP_ATOMIC under spin lock</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-01-02T17:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab9b3de70199f7479e251c30128b30b5559c97b7'/>
<id>urn:sha1:ab9b3de70199f7479e251c30128b30b5559c97b7</id>
<content type='text'>
A spin lock is taken here so we should use GFP_ATOMIC.

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: make functions slim_ack_txn and slim_alloc_txbuf static</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-01-02T17:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c88c8d7aae9e8ef0aa472803f3a14ee9876bbca3'/>
<id>urn:sha1:c88c8d7aae9e8ef0aa472803f3a14ee9876bbca3</id>
<content type='text'>
The functions slim_ack_txn and slim_alloc_txbuf are local to the
source and do not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'slim_ack_txn' was not declared. Should it be static?
symbol 'slim_alloc_txbuf' was not declared. Should it be static?

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: fix retries comparison to correctly identify failed allocation</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-01-02T17:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=551b9ee472147189f988a30cccc0ac918e939a0e'/>
<id>urn:sha1:551b9ee472147189f988a30cccc0ac918e939a0e</id>
<content type='text'>
Currently the check for too many retries fails because retries is actually
-1 when the retry loop terminates if no pbuf can be allocated because of
the post decrement on retries.  Fix this by not comparing retries with zero
but instead check if it is negative.

Detected by CoverityScan, CID#1463143 ("Logically dead code") and
CID#1463144 ("Dereference after null check")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: avoid null pointer dereference on msg</title>
<updated>2018-01-09T16:00:13+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-01-02T17:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7dde60c06cff611b9f88676ef9e67365dc77b19a'/>
<id>urn:sha1:7dde60c06cff611b9f88676ef9e67365dc77b19a</id>
<content type='text'>
The pointer msg is checked to see if it is null at the start of
the function and jumps to the error exit label reterr that then
dereferences msg when it prints a dev_err error message. Avoid
this potential null pointer dereference by only printing the
error message if msg is not null.

Detected by CoverityScan, CID#1463141 ("Dereference after null check")

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>slimbus: qcom-ctrl: use normal allocation</title>
<updated>2018-01-02T16:05:17+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-01-02T10:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c127f98ba9aba1818a6ca3a1da5a24653a10d966'/>
<id>urn:sha1:c127f98ba9aba1818a6ca3a1da5a24653a10d966</id>
<content type='text'>
The previous patch addressed a warning but not the cause:

drivers/slimbus/qcom-ctrl.c: In function 'qcom_slim_probe':
drivers/slimbus/qcom-ctrl.c:584:9: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

There are two things wrong here:

- The naming is very confusing, we now have a member named 'phys'
  that doesn't refer to a phys_addr_t but a dma_addr_t. If we needed
  a dma address, it should be named 'dma' to avoid confusion, and
  to make it less likely that someone passes it into a function that
  expects a physical address.

- The dma address is not used at all at this point. It may have been
  designed to support DMA in the future, but today it doesn't, so
  the only effect right now is to make transfers artificially slower
  by using uncached memory instead of cached memory for a temporary
  buffer.

This removes the unused structure member and instead changes the code
to call devm_kcalloc(), which matches the usage of the 'base' pointer
as an array of temporary buffers.

Fixes: db809859c8ce ("slimbus: qcom: fix incompatible pointer warning")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
