mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 07:11:03 +02:00
usb: mtu3: Fix a double-dereference splat in TP_printk
This splat is reporting a double-dereference that can result in garbage traces being dumped due to the possibility of the TP_printk() being executed without the benefit of main memory being present. The fix is to move the extra dereference from TP_printk() time to TP_fast_assign() time. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEbK7UrM+RBIrCoViJnr8S83LZ+4wFAmrFPjETHHBhdWxtY2tA a2VybmVsLm9yZwAKCRCevxLzctn7jFa3D/4yDuCA4eVlyw8Ldqh0bCjbZCPAz421 TUXA+KU7jQaUy3mVWNyLDpFdOe6cChXskdxnEpzwXeze+05bK1nbu0jEXACU2edO xhbbS20KirhgZcZvS4XdgF2d7RFiHG79ajbsLwy2e1JlO3EtCklVfISLcjB4Xi9S wASHI6loJ4ev6YD6InFsPQVgN19m9SuuVGQRPgtHnzuPrlWxv6KuQg2DMwiJyLI1 13/bOSiLNwVlHynMvtmv/o7Qi1XszhIjG7qotdc8TJPjcjL0grP6qSOr7/QrZxfQ nUsdyVJ+WDarAArQ/Femk4IDRiqYMnLFxN65Ol1CGUlpTkQluU8deqgj5qvEQFVX SopYFDqj4fL7prdfhtOML3DCXtJZ6BAWAA24HUCL7zJ2+pYT57USk6OiSNsIUS8Y khCsW+1pzEInb8PRI7h9dvUu6jRn407PTytKZ4GNt6PnLzDWb8wvRpy+Jjzsr6LS NLyjkNlAVYMBItsfg+Y/9Lt6uqhpioz42+/3J5bsxTqksM4BNSRSZ+paJs/fNgFk drMxMuo5gsI8zQsKaVL6QlIKEChJPKzRzEIOJYKUDx3uhpwbtHO2551KGlQZIRNL ZbXZEDfgAHfGJ3ho3QZ/AyLzFiB+WUbT5+gw6mYNzjiUFObMlgU6p6Z/rS/eMNPi 1qR4UHl0fRvu1Q== =MAuw -----END PGP SIGNATURE----- Merge tag 'usb-mtu3.2026.10.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull tracing fix from Paul McKenney: "Fix a double-dereference splat in TP_printk in usb mtu3. This was a pre-existing bug that can corrupt tracing output, but which was exposed this cycle by additional checking that was added to the tracing subsystem. This splat is reporting a double-dereference that can result in garbage traces being dumped due to the possibility of the TP_printk() being executed without the benefit of main memory being present. The fix is to move the extra dereference from TP_printk() time to TP_fast_assign() time" * tag 'usb-mtu3.2026.10.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: usb: mtu3: Fix double dereference in TP_printk
This commit is contained in:
commit
8fc6e59488
|
|
@ -224,6 +224,7 @@ DECLARE_EVENT_CLASS(mtu3_log_ep,
|
|||
__field(unsigned int, flags)
|
||||
__field(unsigned int, direction)
|
||||
__field(struct mtu3_gpd_ring *, gpd_ring)
|
||||
__field(dma_addr_t, gpd_ring_dma)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__assign_str(name);
|
||||
|
|
@ -235,12 +236,13 @@ DECLARE_EVENT_CLASS(mtu3_log_ep,
|
|||
__entry->flags = mep->flags;
|
||||
__entry->direction = mep->is_in;
|
||||
__entry->gpd_ring = &mep->gpd_ring;
|
||||
__entry->gpd_ring_dma = mep->gpd_ring.dma
|
||||
),
|
||||
TP_printk("%s: type %s maxp %d slot %d mult %d burst %d ring %p/%pad flags %c:%c%c%c:%c",
|
||||
__get_str(name), usb_ep_type_string(__entry->type),
|
||||
__entry->maxp, __entry->slot,
|
||||
__entry->mult, __entry->maxburst,
|
||||
__entry->gpd_ring, &__entry->gpd_ring->dma,
|
||||
__entry->gpd_ring, &__entry->gpd_ring_dma,
|
||||
__entry->flags & MTU3_EP_ENABLED ? 'E' : 'e',
|
||||
__entry->flags & MTU3_EP_STALL ? 'S' : 's',
|
||||
__entry->flags & MTU3_EP_WEDGE ? 'W' : 'w',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user