Skip to content

Commit 2094918

Browse files
committed
Merge branch 'pci/p2pdma'
- Move struct dev_pagemap (a flexible structure) to end of struct pci_p2pdma_pagemap to avoid overwriting things after dev_pagemap (Gustavo A. R. Silva) * pci/p2pdma: PCI/P2PDMA: Remove redundant goto PCI/P2PDMA: Fix undefined behavior bug in struct pci_p2pdma_pagemap
2 parents adfe8d7 + 805b196 commit 2094918

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/p2pdma.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ struct pci_p2pdma {
2828
};
2929

3030
struct pci_p2pdma_pagemap {
31-
struct dev_pagemap pgmap;
3231
struct pci_dev *provider;
3332
u64 bus_offset;
33+
struct dev_pagemap pgmap;
3434
};
3535

3636
static struct pci_p2pdma_pagemap *to_p2p_pgmap(struct dev_pagemap *pgmap)
@@ -837,7 +837,6 @@ void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
837837
if (unlikely(!percpu_ref_tryget_live_rcu(ref))) {
838838
gen_pool_free(p2pdma->pool, (unsigned long) ret, size);
839839
ret = NULL;
840-
goto out;
841840
}
842841
out:
843842
rcu_read_unlock();

0 commit comments

Comments
 (0)