19/04/2024 05:26, Chaoyong He: > From: Zerun Fu <[email protected]> > > 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: [email protected] > Cc: [email protected] > > Signed-off-by: Zerun Fu <[email protected]> > Reviewed-by: Chaoyong He <[email protected]> > Reviewed-by: Long Wu <[email protected]> > Reviewed-by: Peng Zhang <[email protected]>
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

