[PATCH v6 1/2] bus/pci: fix secondary process PCI uio resource map problem
huangdengdui
huangdengdui at huawei.com
Mon Jul 15 07:55:11 CEST 2024
On 2024/7/2 15:40, Chaoyong He wrote:
> 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")
Fixes: e6cf7bee1c77 ("bus/pci: fix UIO resource access from secondary process")
> 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>
> Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
Tested-by: Dengdui Huang <huangdengdui at huawei.com>
More information about the dev
mailing list