]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
lib: logic_pio: Avoid possible overlap for unregistering regions
authorJohn Garry <john.garry@huawei.com>
Tue, 30 Jul 2019 13:29:53 +0000 (21:29 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit266f13b6474707055b444fecbbe33d0c03bfa012
tree6e985eee2a7d01baac6c86ca7ca58bbec9f6ecc3
parentbf17c3ff17539b57fb7ff0489eee69c8dd3b7a26
lib: logic_pio: Avoid possible overlap for unregistering regions

BugLink: https://bugs.launchpad.net/bugs/1843338
commit 0a27142bd1ee259e24a0be2b0133e5ca5df8da91 upstream.

The code was originally written to not support unregistering logical PIO
regions.

To accommodate supporting unregistering logical PIO regions, subtly modify
LOGIC_PIO_CPU_MMIO region registration code, such that the "end" of the
registered regions is the "end" of the last region, and not the sum of
the sizes of all the registered regions.

Cc: stable@vger.kernel.org
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
lib/logic_pio.c