On 2024/7/2 15:40, Chaoyong He wrote:
> From: Zerun Fu <zerun...@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: muk...@igel.co.jp
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Zerun Fu <zerun...@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong...@corigine.com>
> Reviewed-by: Long Wu <long...@corigine.com>
> Reviewed-by: Peng Zhang <peng.zh...@corigine.com>
> Acked-by: Anatoly Burakov <anatoly.bura...@intel.com>

Tested-by: Dengdui Huang <huangdeng...@huawei.com>

Reply via email to