* [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
@ 2024-07-02 18:01 Yunseong Kim
2024-07-04 2:18 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Yunseong Kim @ 2024-07-02 18:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable, Paolo Abeni, Sasha Levin,
Steven Rostedt
Cc: Taehee Yoo, Pedro Tammela, Austin Kim, MichelleJin, linux-kernel,
linux-trace-kernel, netdev, ppbuk5246, Yeoreum Yun
Support backports for stable version. There are two places where null
deref could happen before
commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of __assign_str()")
Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home/
I've checked +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9, this version need
to be applied, So, I applied the patch, tested it again, and confirmed
working fine.
Fixes: 51270d573a8d ("tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string")
Link: https://lore.kernel.org/lkml/20240229143432.273b4871@gandalf.local.home/t/
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org # +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9
Tested-by: Yunseong Kim <yskelg@gmail.com>
Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Yunseong Kim <yskelg@gmail.com>
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Link: https://lore.kernel.org/r/20240624173320.24945-4-yskelg@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/trace/events/qdisc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/trace/events/qdisc.h b/include/trace/events/qdisc.h
index 1f4258308b96..061fd4960303 100644
--- a/include/trace/events/qdisc.h
+++ b/include/trace/events/qdisc.h
@@ -81,14 +81,14 @@ TRACE_EVENT(qdisc_reset,
TP_ARGS(q),
TP_STRUCT__entry(
- __string( dev, qdisc_dev(q)->name )
+ __string( dev, qdisc_dev(q) ? qdisc_dev(q)->name : "(null)" )
__string( kind, q->ops->id )
__field( u32, parent )
__field( u32, handle )
),
TP_fast_assign(
- __assign_str(dev, qdisc_dev(q)->name);
+ __assign_str(dev, qdisc_dev(q) ? qdisc_dev(q)->name : "(null)");
__assign_str(kind, q->ops->id);
__entry->parent = q->parent;
__entry->handle = q->handle;
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
2024-07-02 18:01 [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset() Yunseong Kim
@ 2024-07-04 2:18 ` Jakub Kicinski
2024-07-04 9:32 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-07-04 2:18 UTC (permalink / raw)
To: Yunseong Kim
Cc: Greg Kroah-Hartman, stable, Paolo Abeni, Sasha Levin,
Steven Rostedt, Taehee Yoo, Pedro Tammela, Austin Kim,
MichelleJin, linux-kernel, linux-trace-kernel, netdev, ppbuk5246,
Yeoreum Yun
On Wed, 3 Jul 2024 03:01:47 +0900 Yunseong Kim wrote:
> Support backports for stable version. There are two places where null
> deref could happen before
> commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of __assign_str()")
> Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home/
>
> I've checked +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9, this version need
> to be applied, So, I applied the patch, tested it again, and confirmed
> working fine.
You're missing the customary "[ Upstream commit <upstream commit> ]"
line, not sure Greg will pick this up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
2024-07-04 2:18 ` Jakub Kicinski
@ 2024-07-04 9:32 ` Greg Kroah-Hartman
2024-07-04 11:16 ` Yunseong Kim
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-07-04 9:32 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Yunseong Kim, stable, Paolo Abeni, Sasha Levin, Steven Rostedt,
Taehee Yoo, Pedro Tammela, Austin Kim, MichelleJin, linux-kernel,
linux-trace-kernel, netdev, ppbuk5246, Yeoreum Yun
On Wed, Jul 03, 2024 at 07:18:35PM -0700, Jakub Kicinski wrote:
> On Wed, 3 Jul 2024 03:01:47 +0900 Yunseong Kim wrote:
> > Support backports for stable version. There are two places where null
> > deref could happen before
> > commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of __assign_str()")
> > Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home/
> >
> > I've checked +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9, this version need
> > to be applied, So, I applied the patch, tested it again, and confirmed
> > working fine.
>
> You're missing the customary "[ Upstream commit <upstream commit> ]"
> line, not sure Greg will pick this up.
>
Yeah, I missed this, needs to be very obvious what is happening here.
I'll replace the version in the queues with this one now, thanks.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
2024-07-04 9:32 ` Greg Kroah-Hartman
@ 2024-07-04 11:16 ` Yunseong Kim
2024-07-04 11:54 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Yunseong Kim @ 2024-07-04 11:16 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jakub Kicinski
Cc: stable, Paolo Abeni, Sasha Levin, Steven Rostedt, Taehee Yoo,
Pedro Tammela, Austin Kim, MichelleJin, linux-kernel,
linux-trace-kernel, netdev, ppbuk5246, Yeoreum Yun
Hi Greg, Hi Jakub
On 7/4/24 6:32 오후, Greg Kroah-Hartman wrote:
> On Wed, Jul 03, 2024 at 07:18:35PM -0700, Jakub Kicinski wrote:
>> On Wed, 3 Jul 2024 03:01:47 +0900 Yunseong Kim wrote:
>>> Support backports for stable version. There are two places where null
>>> deref could happen before
>>> commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of __assign_str()")
>>> Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home/
>>>
>>> I've checked +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9, this version need
>>> to be applied, So, I applied the patch, tested it again, and confirmed
>>> working fine.
>>
>> You're missing the customary "[ Upstream commit <upstream commit> ]"
>> line, not sure Greg will pick this up.
>>
>
> Yeah, I missed this, needs to be very obvious what is happening here.
> I'll replace the version in the queues with this one now, thanks.
>
> greg k-h
Thank you for your hard work.
This fix need to be applied versions in +v5.10.213, +v5.15.152, +v6.1.82
+v6.6.22, +v6.7.10, +v6.8, +6.9
Warm regards,
Yunseong Kim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()
2024-07-04 11:16 ` Yunseong Kim
@ 2024-07-04 11:54 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-07-04 11:54 UTC (permalink / raw)
To: Yunseong Kim
Cc: Jakub Kicinski, stable, Paolo Abeni, Sasha Levin, Steven Rostedt,
Taehee Yoo, Pedro Tammela, Austin Kim, MichelleJin, linux-kernel,
linux-trace-kernel, netdev, ppbuk5246, Yeoreum Yun
On Thu, Jul 04, 2024 at 08:16:34PM +0900, Yunseong Kim wrote:
> Hi Greg, Hi Jakub
>
> On 7/4/24 6:32 오후, Greg Kroah-Hartman wrote:
> > On Wed, Jul 03, 2024 at 07:18:35PM -0700, Jakub Kicinski wrote:
> >> On Wed, 3 Jul 2024 03:01:47 +0900 Yunseong Kim wrote:
> >>> Support backports for stable version. There are two places where null
> >>> deref could happen before
> >>> commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of __assign_str()")
> >>> Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home/
> >>>
> >>> I've checked +v6.1.82 +v6.6.22 +v6.7.10, +v6.8, +6.9, this version need
> >>> to be applied, So, I applied the patch, tested it again, and confirmed
> >>> working fine.
> >>
> >> You're missing the customary "[ Upstream commit <upstream commit> ]"
> >> line, not sure Greg will pick this up.
> >>
> >
> > Yeah, I missed this, needs to be very obvious what is happening here.
> > I'll replace the version in the queues with this one now, thanks.
> >
> > greg k-h
>
>
> Thank you for your hard work.
>
>
> This fix need to be applied versions in +v5.10.213, +v5.15.152, +v6.1.82
> +v6.6.22, +v6.7.10, +v6.8, +6.9
>
Already done.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-04 11:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 18:01 [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset() Yunseong Kim
2024-07-04 2:18 ` Jakub Kicinski
2024-07-04 9:32 ` Greg Kroah-Hartman
2024-07-04 11:16 ` Yunseong Kim
2024-07-04 11:54 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).