diff options
author | 2019-02-24 10:17:27 -0500 | |
---|---|---|
committer | 2019-02-24 10:17:56 -0500 | |
commit | 4a8c31a1c6f526ec96a35e613f2a71e26ffbd7dd (patch) | |
tree | 78b6973f8ef763634ab1a235adacd896f43e6ba0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | xen/blkback: add stack variable 'blkif' in connect_ring() (diff) | |
download | wireguard-linux-4a8c31a1c6f526ec96a35e613f2a71e26ffbd7dd.tar.xz wireguard-linux-4a8c31a1c6f526ec96a35e613f2a71e26ffbd7dd.zip |
xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront
The xenstore 'ring-page-order' is used globally for each blkback queue and
therefore should be read from xenstore only once. However, it is obtained
in read_per_ring_refs() which might be called multiple times during the
initialization of each blkback queue.
If the blkfront is malicious and the 'ring-page-order' is set in different
value by blkfront every time before blkback reads it, this may end up at
the "WARN_ON(i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages));" in
xen_blkif_disconnect() when frontend is destroyed.
This patch reworks connect_ring() to read xenstore 'ring-page-order' only
once.
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions