summaryrefslogtreecommitdiffstats
path: root/drivers/pps/pps.c
diff options
context:
space:
mode:
authorSeongJae Park <sjpark@amazon.de>2020-12-14 10:02:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-29 13:42:45 +0100
commitde66402f45c0cae9566b1568cc1b2df2b5ccbbf8 (patch)
tree9c7f257ccd4ca714ce998416c4bd00cf7a7786af /drivers/pps/pps.c
parentd8b0d52e408ca39ebbca98985f29c06fd3bb7325 (diff)
downloadlinux-stable-de66402f45c0cae9566b1568cc1b2df2b5ccbbf8.tar.gz
linux-stable-de66402f45c0cae9566b1568cc1b2df2b5ccbbf8.tar.bz2
linux-stable-de66402f45c0cae9566b1568cc1b2df2b5ccbbf8.zip
xen/xenbus: Allow watches discard events before queueing
commit fed1755b118147721f2c87b37b9d66e62c39b668 upstream. If handling logics of watch events are slower than the events enqueue logic and the events can be created from the guests, the guests could trigger memory pressure by intensively inducing the events, because it will create a huge number of pending events that exhausting the memory. Fortunately, some watch events could be ignored, depending on its handler callback. For example, if the callback has interest in only one single path, the watch wouldn't want multiple pending events. Or, some watches could ignore events to same path. To let such watches to volutarily help avoiding the memory pressure situation, this commit introduces new watch callback, 'will_handle'. If it is not NULL, it will be called for each new event just before enqueuing it. Then, if the callback returns false, the event will be discarded. No watch is using the callback for now, though. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park <sjpark@amazon.de> Reported-by: Michael Kurth <mku@amazon.de> Reported-by: Pawel Wieczorkiewicz <wipawel@amazon.de> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pps/pps.c')
0 files changed, 0 insertions, 0 deletions