From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
"Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH 5.15 70/83] tracing: Update snapshot buffer on resize if it is allocated
Date: Mon, 18 Dec 2023 14:52:31 +0100 [thread overview]
Message-ID: <20231218135052.816029184@linuxfoundation.org> (raw)
In-Reply-To: <20231218135049.738602288@linuxfoundation.org>
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt (Google) <rostedt@goodmis.org>
commit d06aff1cb13d2a0d52b48e605462518149c98c81 upstream.
The snapshot buffer is to mimic the main buffer so that when a snapshot is
needed, the snapshot and main buffer are swapped. When the snapshot buffer
is allocated, it is set to the minimal size that the ring buffer may be at
and still functional. When it is allocated it becomes the same size as the
main ring buffer, and when the main ring buffer changes in size, it should
do.
Currently, the resize only updates the snapshot buffer if it's used by the
current tracer (ie. the preemptirqsoff tracer). But it needs to be updated
anytime it is allocated.
When changing the size of the main buffer, instead of looking to see if
the current tracer is utilizing the snapshot buffer, just check if it is
allocated to know if it should be updated or not.
Also fix typo in comment just above the code change.
Link: https://lore.kernel.org/linux-trace-kernel/20231210225447.48476a6a@rorschach.local.home
Cc: stable@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: ad909e21bbe69 ("tracing: Add internal tracing_snapshot() functions")
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/trace/trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6243,7 +6243,7 @@ static int __tracing_resize_ring_buffer(
if (!tr->array_buffer.buffer)
return 0;
- /* Do not allow tracing while resizng ring buffer */
+ /* Do not allow tracing while resizing ring buffer */
tracing_stop_tr(tr);
ret = ring_buffer_resize(tr->array_buffer.buffer, size, cpu);
@@ -6251,7 +6251,7 @@ static int __tracing_resize_ring_buffer(
goto out_start;
#ifdef CONFIG_TRACER_MAX_TRACE
- if (!tr->current_trace->use_max_tr)
+ if (!tr->allocated_snapshot)
goto out;
ret = ring_buffer_resize(tr->max_buffer.buffer, size, cpu);
next prev parent reply other threads:[~2023-12-18 14:14 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 13:51 [PATCH 5.15 00/83] 5.15.144-rc1 review Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 01/83] perf/x86/uncore: Dont WARN_ON_ONCE() for a broken discovery table Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 02/83] r8152: add USB device driver for config selection Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 03/83] r8152: add vendor/device ID pair for D-Link DUB-E250 Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 04/83] r8152: add vendor/device ID pair for ASUS USB-C2500 Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 05/83] netfilter: nf_tables: fix exist matching on bigendian arches Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 06/83] mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource() Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 07/83] memblock: allow to specify flags with memblock_add_node() Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 08/83] MIPS: Loongson64: Handle more memory types passed from firmware Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 09/83] ksmbd: fix memory leak in smb2_lock() Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 10/83] afs: Fix refcount underflow from error handling race Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 11/83] HID: lenovo: Restrict detection of patched firmware only to USB cptkbd Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 12/83] net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 13/83] qca_debug: Prevent crash on TX ring changes Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 14/83] qca_debug: Fix ethtool -G iface tx behavior Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 15/83] qca_spi: Fix reset behavior Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 16/83] atm: solos-pci: Fix potential deadlock on &cli_queue_lock Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 17/83] atm: solos-pci: Fix potential deadlock on &tx_queue_lock Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 18/83] net: vlan: introduce skb_vlan_eth_hdr() Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 19/83] net: fec: correct queue selection Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 20/83] octeontx2-af: fix a use-after-free in rvu_nix_register_reporters Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 21/83] octeontx2-pf: Fix promisc mcam entry action Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 22/83] octeontx2-af: Update RSS algorithm index Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 23/83] atm: Fix Use-After-Free in do_vcc_ioctl Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 24/83] net/rose: Fix Use-After-Free in rose_ioctl Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 25/83] qed: Fix a potential use-after-free in qed_cxt_tables_alloc Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 26/83] net: Remove acked SYN flag from packet in the transmit queue correctly Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 27/83] net: ena: Destroy correct number of xdp queues upon failure Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 28/83] net: ena: Fix xdp drops handling due to multibuf packets Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 29/83] net: ena: Fix XDP redirection error Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 30/83] stmmac: dwmac-loongson: Make sure MDIO is initialized before use Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 31/83] sign-file: Fix incorrect return values check Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 32/83] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space() Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 33/83] dpaa2-switch: fix size of the dma_unmap Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 34/83] net: stmmac: use dev_err_probe() for reporting mdio bus registration failure Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 35/83] net: stmmac: Handle disabled MDIO busses from devicetree Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 36/83] appletalk: Fix Use-After-Free in atalk_ioctl Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 37/83] net: atlantic: fix double free in ring reinit logic Greg Kroah-Hartman
2023-12-18 13:51 ` [PATCH 5.15 38/83] cred: switch to using atomic_long_t Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 39/83] fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 40/83] ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 41/83] ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 42/83] ALSA: hda/realtek: Apply mute LED quirk for HP15-db Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 43/83] Revert "PCI: acpiphp: Reassign resources on bridge if necessary" Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 44/83] PCI: loongson: Limit MRRS to 256 Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 45/83] drm/mediatek: Add spinlock for setting vblank event in atomic_begin Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 46/83] usb: aqc111: check packet for fixup for true limit Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 47/83] stmmac: dwmac-loongson: Add architecture dependency Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 48/83] blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 49/83] blk-cgroup: bypass blkcg_deactivate_policy after destroying Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 50/83] bcache: avoid oversize memory allocation by small stripe_size Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 51/83] bcache: remove redundant assignment to variable cur_idx Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 52/83] bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc() Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 53/83] bcache: avoid NULL checking to c->root in run_cache_set() Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 54/83] platform/x86: intel_telemetry: Fix kernel doc descriptions Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 55/83] HID: glorious: fix Glorious Model I HID report Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 56/83] HID: add ALWAYS_POLL quirk for Apple kb Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 57/83] HID: hid-asus: reset the backlight brightness level on resume Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 58/83] HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 59/83] asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 60/83] net: usb: qmi_wwan: claim interface 4 for ZTE MF290 Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 61/83] HID: hid-asus: add const to read-only outgoing usb buffer Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 62/83] perf: Fix perf_event_validate_size() lockdep splat Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 63/83] btrfs: do not allow non subvolume root targets for snapshot Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 64/83] soundwire: stream: fix NULL pointer dereference for multi_link Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 65/83] ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 66/83] arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 67/83] team: Fix use-after-free when an option instance allocation fails Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 68/83] drm/amdgpu/sdma5.2: add begin/end_use ring callbacks Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 69/83] ring-buffer: Fix memory leak of free page Greg Kroah-Hartman
2023-12-18 13:52 ` Greg Kroah-Hartman [this message]
2023-12-18 13:52 ` [PATCH 5.15 71/83] ring-buffer: Do not update before stamp when switching sub-buffers Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 72/83] ring-buffer: Have saved event hold the entire event Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 73/83] ring-buffer: Fix writing to the buffer with max_data_size Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 74/83] ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 75/83] ring-buffer: Do not try to put back write_stamp Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 76/83] USB: gadget: core: adjust uevent timing on gadget unbind Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 77/83] RDMA/irdma: Prevent zero-length STAG registration Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 78/83] powerpc/ftrace: Create a dummy stackframe to fix stack unwind Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 79/83] powerpc/ftrace: Fix stack teardown in ftrace_no_trace Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 80/83] ksmbd: Mark as BROKEN in the 5.15.y kernel Greg Kroah-Hartman
2023-12-18 15:54 ` Namjae Jeon
2023-12-19 7:47 ` Greg Kroah-Hartman
2023-12-19 11:20 ` Namjae Jeon
2023-12-18 13:52 ` [PATCH 5.15 81/83] r8152: avoid to change cfg for all devices Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 82/83] r8152: remove rtl_vendor_mode function Greg Kroah-Hartman
2023-12-18 13:52 ` [PATCH 5.15 83/83] r8152: fix the autosuspend doesnt work Greg Kroah-Hartman
2023-12-18 18:48 ` [PATCH 5.15 00/83] 5.15.144-rc1 review SeongJae Park
2023-12-19 0:00 ` Shuah Khan
2023-12-19 1:05 ` Kelsey Steele
2023-12-19 6:19 ` Harshit Mogalapalli
2023-12-19 9:05 ` Naresh Kamboju
2023-12-19 11:30 ` Jon Hunter
2023-12-19 19:22 ` Allen
2023-12-19 21:43 ` Florian Fainelli
2023-12-20 1:36 ` Ron Economos
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=20231218135052.816029184@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=patches@lists.linux.dev \
--cc=rostedt@goodmis.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