From: Jacob Keller <jacob.e.keller@intel.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>, <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>,
<linux-can@vger.kernel.org>, <kernel@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Subject: Re: [PATCH net 6/6] can: gw: fix RCU/BH usage in cgw_create_job()
Date: Tue, 6 May 2025 11:31:52 -0700 [thread overview]
Message-ID: <a48f2f20-6aea-400e-a441-7273c5349e2f@intel.com> (raw)
In-Reply-To: <20250506135939.652543-7-mkl@pengutronix.de>
On 5/6/2025 6:56 AM, Marc Kleine-Budde wrote:
> From: Oliver Hartkopp <socketcan@hartkopp.net>
>
> As reported by Sebastian Andrzej Siewior the use of local_bh_disable()
> is only feasible in uni processor systems to update the modification rules.
> The usual use-case to update the modification rules is to update the data
> of the modifications but not the modification types (AND/OR/XOR/SET) or
> the checksum functions itself.
>
> To omit additional memory allocations to maintain fast modification
> switching times, the modification description space is doubled at gw-job
> creation time so that only the reference to the active modification
> description is changed under rcu protection.
>
> Rename cgw_job::mod to cf_mod and make it a RCU pointer. Allocate in
> cgw_create_job() and free it together with cgw_job in
> cgw_job_free_rcu(). Update all users to dereference cgw_job::cf_mod with
> a RCU accessor and if possible once.
>
> [bigeasy: Replace mod1/mod2 from the Oliver's original patch with dynamic
> allocation, use RCU annotation and accessor]
>
> Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Closes: https://lore.kernel.org/linux-can/20231031112349.y0aLoBrz@linutronix.de/
> Fixes: dd895d7f21b2 ("can: cangw: introduce optional uid to reference created routing jobs")
> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Link: https://patch.msgid.link/20250429070555.cs-7b_eZ@linutronix.de
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
prev parent reply other threads:[~2025-05-06 18:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 13:56 [PATCH net 0/6] pull-request: can 2025-05-06 Marc Kleine-Budde
2025-05-06 13:56 ` [PATCH net 1/6] can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe Marc Kleine-Budde
2025-05-06 18:25 ` Jacob Keller
2025-05-07 2:10 ` patchwork-bot+netdevbpf
2025-05-06 13:56 ` [PATCH net 2/6] can: mcp251xfd: fix TDC setting for low data bit rates Marc Kleine-Budde
2025-05-06 18:27 ` Jacob Keller
2025-05-06 13:56 ` [PATCH net 3/6] can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls Marc Kleine-Budde
2025-05-06 18:28 ` Jacob Keller
2025-05-06 13:56 ` [PATCH net 4/6] can: rockchip_canfd: rkcanfd_remove(): " Marc Kleine-Budde
2025-05-06 18:29 ` Jacob Keller
2025-05-06 13:56 ` [PATCH net 5/6] can: mcan: m_can_class_unregister(): " Marc Kleine-Budde
2025-05-06 18:29 ` Jacob Keller
2025-05-06 13:56 ` [PATCH net 6/6] can: gw: fix RCU/BH usage in cgw_create_job() Marc Kleine-Budde
2025-05-06 18:31 ` Jacob Keller [this message]
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=a48f2f20-6aea-400e-a441-7273c5349e2f@intel.com \
--to=jacob.e.keller@intel.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/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