[PATCH v3 1/2] bus/pci: fix secondary process PCI uio resource map problem
Thomas Monjalon
thomas at monjalon.net
Thu Jun 27 16:00:42 CEST 2024
19/04/2024 05:26, Chaoyong He:
> From: Zerun Fu <zerun.fu at corigine.com>
>
> For the primary process, the logic loops all BARs and will skip
> the map of BAR with an invalid physical address (0), also will
> assign 'uio_res->nb_maps' with the real mapped BARs number. But
> for the secondary process, instead of loops all BARs, the logic
> using the 'uio_res->nb_map' as index. If the device uses continuous
> BARs there will be no problem, whereas if it uses discrete BARs,
> it will lead to mapping errors.
>
> Fix this problem by also loops all BARs and skip the map of BAR
> with an invalid physical address in secondary process.
>
> Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")
> Cc: mukawa at igel.co.jp
> Cc: stable at dpdk.org
>
> Signed-off-by: Zerun Fu <zerun.fu at corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
> Reviewed-by: Long Wu <long.wu at corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
You should have kept the ack from Anatoly here.
> drivers/bus/pci/pci_common_uio.c | 40 ++++++++++++++++++++------------
> 1 file changed, 25 insertions(+), 15 deletions(-)
There are too many changes in this sensitive code.
Please could you introduce a first patch for the renaming of the variable "i"?
It should make this patch simpler to read.
Thank you
More information about the dev
mailing list