<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/greybus, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-21T12:36:00+00:00</updated>
<entry>
<title>greybus: Fix use-after-free bug in gb_interface_release due to race condition.</title>
<updated>2024-06-21T12:36:00+00:00</updated>
<author>
<name>Sicong Huang</name>
<email>congei42@163.com</email>
</author>
<published>2024-04-16T08:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a733d69a4a59c2d08620e6589d823c24be773dc'/>
<id>urn:sha1:9a733d69a4a59c2d08620e6589d823c24be773dc</id>
<content type='text'>
commit 5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce upstream.

In gb_interface_create, &amp;intf-&gt;mode_switch_completion is bound with
gb_interface_mode_switch_work. Then it will be started by
gb_interface_request_mode_switch. Here is the relevant code.
if (!queue_work(system_long_wq, &amp;intf-&gt;mode_switch_work)) {
	...
}

If we call gb_interface_release to make cleanup, there may be an
unfinished work. This function will call kfree to free the object
"intf". However, if gb_interface_mode_switch_work is scheduled to
run after kfree, it may cause use-after-free error as
gb_interface_mode_switch_work will use the object "intf".
The possible execution flow that may lead to the issue is as follows:

CPU0                            CPU1

                            |   gb_interface_create
                            |   gb_interface_request_mode_switch
gb_interface_release        |
kfree(intf) (free)          |
                            |   gb_interface_mode_switch_work
                            |   mutex_lock(&amp;intf-&gt;mutex) (use)

Fix it by canceling the work before kfree.

Signed-off-by: Sicong Huang &lt;congei42@163.com&gt;
Link: https://lore.kernel.org/r/20240416080313.92306-1-congei42@163.com
Cc: Ronnie Sahlberg &lt;rsahlberg@ciq.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: svc: clean up link configuration hack at hello</title>
<updated>2022-02-04T14:27:44+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2022-02-02T11:33:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a74e7263b53424a7f5b999a11d610231338f5b99'/>
<id>urn:sha1:a74e7263b53424a7f5b999a11d610231338f5b99</id>
<content type='text'>
Commit ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to
handle required load") added a temporary hack which reconfigures the
link at HELLO by abusing the deferred request processing mechanism.

Restructure the HELLO request processing so that the link-configuration
work is queued before creating the debugfs files and add a comment
explaining why it's there.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20220202113347.1288-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: svc: clean up hello error path</title>
<updated>2022-02-04T14:27:44+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2022-02-02T11:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f648e00f50ff8b04a4cfe13d58a0227bc2b56bb'/>
<id>urn:sha1:5f648e00f50ff8b04a4cfe13d58a0227bc2b56bb</id>
<content type='text'>
While currently safe, it is unnecessary (and confusing) to try to
destroy the watchdog when watchdog creation fails.

Change the corresponding error path to only deregister the svc.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20220202113347.1288-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: svc: fix an error handling bug in gb_svc_hello()</title>
<updated>2022-02-04T14:27:44+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-02-02T11:33:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f8583a3b7552092582a92e7bbd2153319929ad7'/>
<id>urn:sha1:5f8583a3b7552092582a92e7bbd2153319929ad7</id>
<content type='text'>
Cleanup if gb_svc_queue_deferred_request() fails.

Link: https://lore.kernel.org/r/20220202072016.GA6748@kili
Fixes: ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to handle required load")
Cc: stable@vger.kernel.org      # 4.9
[johan: fix commit summary prefix and rename label ]
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20220202113347.1288-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: es2: fix typo in a comment</title>
<updated>2021-12-21T09:13:26+00:00</updated>
<author>
<name>Jason Wang</name>
<email>wangborong@cdjrlc.com</email>
</author>
<published>2021-12-12T03:16:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=909c648e03e8eda8eb72678b3e95042739d6eb71'/>
<id>urn:sha1:909c648e03e8eda8eb72678b3e95042739d6eb71</id>
<content type='text'>
The double `for' in the comment in line 81 is repeated. Remove one
of them from the comment.

Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jason Wang &lt;wangborong@cdjrlc.com&gt;
Link: https://lore.kernel.org/r/20211212031657.41169-1-wangborong@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: es2: fix kernel-doc warnings</title>
<updated>2021-04-16T05:26:50+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2021-04-15T05:43:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39d2a7898d7fb61276ec766046940dda9080fd4b'/>
<id>urn:sha1:39d2a7898d7fb61276ec766046940dda9080fd4b</id>
<content type='text'>
Fix these kernel-doc complaints:

../drivers/greybus/es2.c:79: warning: bad line:
../drivers/greybus/es2.c:100: warning: cannot understand function prototype: 'struct es2_ap_dev '
es2.c:126: warning: Function parameter or member 'cdsi1_in_use' not described in 'es2_ap_dev'

Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Alex Elder &lt;elder@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: greybus-dev@lists.linaro.org (moderated for non-subscribers)
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/20210415054338.2223-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: remove stray nul byte in apb_log_enable_read output</title>
<updated>2021-04-02T14:24:56+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2021-03-26T15:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=012ac583aa9b512707b39b5a9afb303089a222fe'/>
<id>urn:sha1:012ac583aa9b512707b39b5a9afb303089a222fe</id>
<content type='text'>
Including a nul byte in the otherwise human-readable ascii output
from this debugfs file is probably not intended.

Acked-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Link: https://lore.kernel.org/r/20210326152254.733066-1-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: es2: drop short control-transfer checks</title>
<updated>2021-01-26T18:20:11+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-01-18T14:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4240253ac853886e7066e0bb765e2d96e3b1eb6'/>
<id>urn:sha1:e4240253ac853886e7066e0bb765e2d96e3b1eb6</id>
<content type='text'>
There's no need to check for short USB control transfers when sending
data using so remove the redundant sanity checks.

Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20210118144629.25533-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>greybus: remove h from printk format specifier</title>
<updated>2021-01-05T14:18:23+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2020-12-15T14:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c5a6a7b71431f39bd80f6c3a14a429602a5555f'/>
<id>urn:sha1:4c5a6a7b71431f39bd80f6c3a14a429602a5555f</id>
<content type='text'>
See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Link: https://lore.kernel.org/r/20201215145306.1901598-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/greybus: Use kobj_to_dev()</title>
<updated>2020-09-04T16:06:01+00:00</updated>
<author>
<name>Wang Qing</name>
<email>wangqing@vivo.com</email>
</author>
<published>2020-08-13T03:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=947bece14b741ed339eda14db42cf3c357183501'/>
<id>urn:sha1:947bece14b741ed339eda14db42cf3c357183501</id>
<content type='text'>
Use kobj_to_dev() instead of container_of()

Signed-off-by: Wang Qing &lt;wangqing@vivo.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/1597289690-22857-1-git-send-email-wangqing@vivo.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
