From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Davide Caratti <dcaratti@redhat.com>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Marc Kleine-Budde <mkl@pengutronix.de>,
robin@protonic.nl, linux-can@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of j1939_proto.inuse_idx
Date: Tue, 6 May 2025 08:49:37 +0200 [thread overview]
Message-ID: <640538cd-d1b6-46aa-9ef8-76aaa0e05609@hartkopp.net> (raw)
In-Reply-To: <20250505221419.2672473-624-sashal@kernel.org>
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;
next prev parent reply other threads:[~2025-05-06 7:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2025-05-20 14:08 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=640538cd-d1b6-46aa-9ef8-76aaa0e05609@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=dcaratti@redhat.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=robin@protonic.nl \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox