* [PATCH AUTOSEL 6.14 393/642] can: c_can: Use of_property_present() to test existence of DT property [not found] <20250505221419.2672473-1-sashal@kernel.org> @ 2025-05-05 22:10 ` Sasha Levin 2025-05-05 22:14 ` [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx Sasha Levin 1 sibling, 0 replies; 4+ messages in thread From: Sasha Levin @ 2025-05-05 22:10 UTC (permalink / raw) To: linux-kernel, stable Cc: Krzysztof Kozlowski, Rob Herring, Vincent Mailhol, Marc Kleine-Budde, Sasha Levin, u.kleine-koenig, linux-can From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> [ Upstream commit ab1bc2290fd8311d49b87c29f1eb123fcb581bee ] of_property_read_bool() should be used only on boolean properties. Cc: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://patch.msgid.link/20250212-syscon-phandle-args-can-v2-3-ac9a1253396b@linaro.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/net/can/c_can/c_can_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 399844809bbea..bb6071a758f36 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -324,7 +324,7 @@ static int c_can_plat_probe(struct platform_device *pdev) /* Check if we need custom RAMINIT via syscon. Mostly for TI * platforms. Only supported with DT boot. */ - if (np && of_property_read_bool(np, "syscon-raminit")) { + if (np && of_property_present(np, "syscon-raminit")) { u32 id; struct c_can_raminit *raminit = &priv->raminit_sys; -- 2.39.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx [not found] <20250505221419.2672473-1-sashal@kernel.org> 2025-05-05 22:10 ` [PATCH AUTOSEL 6.14 393/642] can: c_can: Use of_property_present() to test existence of DT property Sasha Levin @ 2025-05-05 22:14 ` Sasha Levin 2025-05-06 6:49 ` Oliver Hartkopp 1 sibling, 1 reply; 4+ messages in thread From: Sasha Levin @ 2025-05-05 22:14 UTC (permalink / raw) To: linux-kernel, stable Cc: Davide Caratti, Oliver Hartkopp, Oleksij Rempel, Marc Kleine-Budde, Sasha Levin, robin, linux-can From: Davide Caratti <dcaratti@redhat.com> [ Upstream commit 8b1879491472c145c58c3cbbaf0e05ea93ee5ddf ] Like other protocols on top of AF_CAN family, also j1939_proto.inuse_idx needs to be decremented on socket dismantle. Fixes: 6bffe88452db ("can: add protocol counter for AF_CAN sockets") Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Closes: https://lore.kernel.org/linux-can/7e35b13f-bbc4-491e-9081-fb939e1b8df0@hartkopp.net/ Signed-off-by: Davide Caratti <dcaratti@redhat.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/09ce71f281b9e27d1e3d1104430bf3fceb8c7321.1742292636.git.dcaratti@redhat.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org> --- net/can/j1939/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c index 17226b2341d03..6fefe7a687611 100644 --- a/net/can/j1939/socket.c +++ b/net/can/j1939/socket.c @@ -655,6 +655,7 @@ static int j1939_sk_release(struct socket *sock) sock->sk = NULL; release_sock(sk); + sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); sock_put(sk); return 0; -- 2.39.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx 2025-05-05 22:14 ` [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx Sasha Levin @ 2025-05-06 6:49 ` Oliver Hartkopp 2025-05-20 14:08 ` Sasha Levin 0 siblings, 1 reply; 4+ messages in thread From: Oliver Hartkopp @ 2025-05-06 6:49 UTC (permalink / raw) To: Sasha Levin, linux-kernel, stable Cc: Davide Caratti, Oleksij Rempel, Marc Kleine-Budde, robin, linux-can Hi Sasha, this fix is needed for this commit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/can?id=6bffe88452dbe284747442f10a7ac8249d6495d7 6bffe88452db ("can: add protocol counter for AF_CAN sockets") which has been introduced in 6.15 It must not be applied to 6.14-stable. Best regards, Oliver On 06.05.25 00:14, Sasha Levin wrote: > From: Davide Caratti <dcaratti@redhat.com> > > [ Upstream commit 8b1879491472c145c58c3cbbaf0e05ea93ee5ddf ] > > Like other protocols on top of AF_CAN family, also j1939_proto.inuse_idx > needs to be decremented on socket dismantle. > > Fixes: 6bffe88452db ("can: add protocol counter for AF_CAN sockets") > Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> > Closes: https://lore.kernel.org/linux-can/7e35b13f-bbc4-491e-9081-fb939e1b8df0@hartkopp.net/ > Signed-off-by: Davide Caratti <dcaratti@redhat.com> > Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> > Link: https://patch.msgid.link/09ce71f281b9e27d1e3d1104430bf3fceb8c7321.1742292636.git.dcaratti@redhat.com > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > Signed-off-by: Sasha Levin <sashal@kernel.org> > --- > net/can/j1939/socket.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c > index 17226b2341d03..6fefe7a687611 100644 > --- a/net/can/j1939/socket.c > +++ b/net/can/j1939/socket.c > @@ -655,6 +655,7 @@ static int j1939_sk_release(struct socket *sock) > sock->sk = NULL; > > release_sock(sk); > + sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); > sock_put(sk); > > return 0; ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx 2025-05-06 6:49 ` Oliver Hartkopp @ 2025-05-20 14:08 ` Sasha Levin 0 siblings, 0 replies; 4+ messages in thread From: Sasha Levin @ 2025-05-20 14:08 UTC (permalink / raw) To: Oliver Hartkopp Cc: linux-kernel, stable, Davide Caratti, Oleksij Rempel, Marc Kleine-Budde, robin, linux-can On Tue, May 06, 2025 at 08:49:37AM +0200, Oliver Hartkopp wrote: >Hi Sasha, > >this fix is needed for this commit > >https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/can?id=6bffe88452dbe284747442f10a7ac8249d6495d7 > >6bffe88452db ("can: add protocol counter for AF_CAN sockets") > >which has been introduced in 6.15 > >It must not be applied to 6.14-stable. I'll drop it, thanks! -- Thanks, Sasha ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-20 14:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250505221419.2672473-1-sashal@kernel.org>
2025-05-05 22:10 ` [PATCH AUTOSEL 6.14 393/642] can: c_can: Use of_property_present() to test existence of DT property Sasha Levin
2025-05-05 22:14 ` [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx Sasha Levin
2025-05-06 6:49 ` Oliver Hartkopp
2025-05-20 14:08 ` Sasha Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox