All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.6 01/20] tools: iio: replace seekdir() in iio_generic_buffer
@ 2024-04-03 17:17 Sasha Levin
  2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 02/20] usb: storage: sddr55: fix sloppy typing in sddr55_{read|write}_data() Sasha Levin
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Sasha Levin @ 2024-04-03 17:17 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Petre Rodan, Jonathan Cameron, Sasha Levin, jic23, linux-iio

From: Petre Rodan <petre.rodan@subdimension.ro>

[ Upstream commit 4e6500bfa053dc133021f9c144261b77b0ba7dc8 ]

Replace seekdir() with rewinddir() in order to fix a localized glibc bug.

One of the glibc patches that stable Gentoo is using causes an improper
directory stream positioning bug on 32bit arm. That in turn ends up as a
floating point exception in iio_generic_buffer.

The attached patch provides a fix by using an equivalent function which
should not cause trouble for other distros and is easier to reason about
in general as it obviously always goes back to to the start.

https://sourceware.org/bugzilla/show_bug.cgi?id=31212

Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
Link: https://lore.kernel.org/r/20240108103224.3986-1-petre.rodan@subdimension.ro
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/iio/iio_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index 6a00a6eecaef0..c5c5082cb24e5 100644
--- a/tools/iio/iio_utils.c
+++ b/tools/iio/iio_utils.c
@@ -376,7 +376,7 @@ int build_channel_array(const char *device_dir, int buffer_idx,
 		goto error_close_dir;
 	}
 
-	seekdir(dp, 0);
+	rewinddir(dp);
 	while (ent = readdir(dp), ent) {
 		if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"),
 			   "_en") == 0) {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-04-03 17:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 17:17 [PATCH AUTOSEL 6.6 01/20] tools: iio: replace seekdir() in iio_generic_buffer Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 02/20] usb: storage: sddr55: fix sloppy typing in sddr55_{read|write}_data() Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 03/20] bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 04/20] kernfs: RCU protect kernfs_nodes and avoid kernfs_idr_lock in kernfs_find_and_get_node_by_id() Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 05/20] usb: gadget: uvc: mark incomplete frames with UVC_STREAM_ERR Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 06/20] usb: typec: ucsi: Limit read size on v1.2 Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 07/20] thunderbolt: Keep the domain powered when USB4 port is in redrive mode Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 08/20] usb: typec: tcpci: add generic tcpci fallback compatible Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 09/20] usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 10/20] ASoC: amd: yc: Fix non-functional mic on ASUS M7600RE Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 11/20] thermal/of: Assume polling-delay(-passive) 0 when absent Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 12/20] ASoC: soc-core.c: Skip dummy codec when adding platforms Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 13/20] x86/xen: attempt to inflate the memory balloon on PVH Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 14/20] fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2 Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 15/20] io_uring: clear opcode specific data for an early failure Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 16/20] modpost: fix null pointer dereference Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 17/20] drivers/nvme: Add quirks for device 126f:2262 Sasha Levin
2024-04-03 17:17 ` [PATCH AUTOSEL 6.6 18/20] fbmon: prevent division by zero in fb_videomode_from_videomode() Sasha Levin
2024-04-03 17:18 ` [PATCH AUTOSEL 6.6 19/20] ALSA: hda/realtek: Add quirks for some Clevo laptops Sasha Levin
2024-04-03 17:18 ` [PATCH AUTOSEL 6.6 20/20] drm/amdgpu: fix use-after-free bug Sasha Levin

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.