* [PATCH RT v2] net: Add missing seqcount_release() to qdisc_run_end()
@ 2020-11-14 20:12 Tom Zanussi
2020-11-16 17:22 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 3+ messages in thread
From: Tom Zanussi @ 2020-11-14 20:12 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Steven Rostedt; +Cc: linux-rt-users, Mike Galbraith
Hi Sebastian and Steve,
This patch fixes a problem [1] I saw when backporting 'net: Properly
annotate the try-lock for the seqlock" from 5.4 to 4.19 which also
looks like it should apply to -devel.
This was tested on 5.14 but applies cleanly to rt-devel as well.
Thanks,
Tom
[1] https://lore.kernel.org/linux-rt-users/20201110153853.463368981@goodmis.org/T/#m0be3a1290486f3493828dedcf7f06d5fbba092a8
v2: Mike Galbraith pointed out that write_sequnlock() already contains
__raw_write_seqcount_end().
---
The patch ('net: Properly annotate the try-lock for the seqlock") adds
a seqcount_acquire() in qdisc_run_begin() but omits the corresponding
seqcount_release() in qdisc_run_end().
Add it unconditionally, since qdisc_run_end() is never called unless
qdisc_run_begin() succeeds, and if it succeeds, seqcount_acquire()
will have been called.
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
---
include/net/sch_generic.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 112d2dca8b08..221470e38031 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -192,7 +192,10 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
static inline void qdisc_run_end(struct Qdisc *qdisc)
{
#ifdef CONFIG_PREEMPT_RT
+ seqcount_t *s = &qdisc->running.seqcount;
+
write_sequnlock(&qdisc->running);
+ seqcount_release(&s->dep_map, 1, _RET_IP_);
#else
write_seqcount_end(&qdisc->running);
#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RT v2] net: Add missing seqcount_release() to qdisc_run_end()
2020-11-14 20:12 [PATCH RT v2] net: Add missing seqcount_release() to qdisc_run_end() Tom Zanussi
@ 2020-11-16 17:22 ` Sebastian Andrzej Siewior
2020-11-16 18:02 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2020-11-16 17:22 UTC (permalink / raw)
To: Tom Zanussi; +Cc: Steven Rostedt, linux-rt-users, Mike Galbraith
On 2020-11-14 14:12:45 [-0600], Tom Zanussi wrote:
> Hi Sebastian and Steve,
Hi Tom,
> This patch fixes a problem [1] I saw when backporting 'net: Properly
> annotate the try-lock for the seqlock" from 5.4 to 4.19 which also
> looks like it should apply to -devel.
>
> This was tested on 5.14 but applies cleanly to rt-devel as well.
as just explained in the other thread, I would recommend to simply drop
that backported patch instead. There should be no splat in the devel
tree.
> Thanks,
>
> Tom
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RT v2] net: Add missing seqcount_release() to qdisc_run_end()
2020-11-16 17:22 ` Sebastian Andrzej Siewior
@ 2020-11-16 18:02 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-11-16 18:02 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: Tom Zanussi, linux-rt-users, Mike Galbraith
On Mon, 16 Nov 2020 18:22:21 +0100
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > This was tested on 5.14 but applies cleanly to rt-devel as well.
>
> as just explained in the other thread, I would recommend to simply drop
> that backported patch instead. There should be no splat in the devel
> tree.
I'll do that. Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-16 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-14 20:12 [PATCH RT v2] net: Add missing seqcount_release() to qdisc_run_end() Tom Zanussi
2020-11-16 17:22 ` Sebastian Andrzej Siewior
2020-11-16 18:02 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.