]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: dell_rbu: Fix list usage
authorStuart Hayes <stuart.w.hayes@gmail.com>
Mon, 9 Jun 2025 18:46:56 +0000 (13:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:33 +0000 (11:05 +0100)
commit07d7b8e7ef7d1f812a6211ed531947c56d09e95e
tree6483050d8a24e0c37f33bc14e22ed3438812d78f
parentb90dd5b12152335b9cb95a560be683606c878e0d
platform/x86: dell_rbu: Fix list usage

[ Upstream commit 61ce04601e0d8265ec6d2ffa6df5a7e1bce64854 ]

Pass the correct list head to list_for_each_entry*() when looping through
the packet list.

Without this patch, reading the packet data via sysfs will show the data
incorrectly (because it starts at the wrong packet), and clearing the
packet list will result in a NULL pointer dereference.

Fixes: d19f359fbdc6 ("platform/x86: dell_rbu: don't open code list_for_each_entry*()")
Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Link: https://lore.kernel.org/r/20250609184659.7210-3-stuart.w.hayes@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/dell/dell_rbu.c