summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2022-11-30 17:36:02 +0100
committerJuergen Gross <jgross@suse.com>2023-01-09 07:59:12 +0100
commitc0dccad87cf68fc6012aec7567e354353097ec1a (patch)
tree6c332b90dc7a4f523bc8e20a0fe1242d9f432a92 /include/uapi/linux/netfilter/nfnetlink_cttimeout.h
parent37c1785609833e626d344047a84e272b7879b2c3 (diff)
downloadlinux-c0dccad87cf68fc6012aec7567e354353097ec1a.tar.bz2
hvc/xen: lock console list traversal
The currently lockless access to the xen console list in vtermno_to_xencons() is incorrect, as additions and removals from the list can happen anytime, and as such the traversal of the list to get the private console data for a given termno needs to happen with the lock held. Note users that modify the list already do so with the lock taken. Adjust current lock takers to use the _irq{save,restore} helpers, since the context in which vtermno_to_xencons() is called can have interrupts disabled. Use the _irq{save,restore} set of helpers to switch the current callers to disable interrupts in the locked region. I haven't checked if existing users could instead use the _irq variant, as I think it's safer to use _irq{save,restore} upfront. While there switch from using list_for_each_entry_safe to list_for_each_entry: the current entry cursor won't be removed as part of the code in the loop body, so using the _safe variant is pointless. Fixes: 02e19f9c7cac ('hvc_xen: implement multiconsole support') Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Link: https://lore.kernel.org/r/20221130163611.14686-1-roger.pau@citrix.com Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/uapi/linux/netfilter/nfnetlink_cttimeout.h')
0 files changed, 0 insertions, 0 deletions