mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
wanxl_pci_init_one() stores the freshly allocated card in driver data
before the PLX BAR is mapped. Several early probe failures then unwind
through wanxl_pci_remove_one(), including failure to allocate the coherent
status area or to restore the DMA mask.
wanxl_pci_remove_one() unconditionally calls wanxl_reset(), and
wanxl_reset() dereferences card->plx. On those early failures card->plx
is still NULL, so the error path can dereference a NULL MMIO pointer.
Only issue the hardware reset once the BAR mapping exists. The remaining
cleanup in wanxl_pci_remove_one() already checks whether later resources
were allocated.
This issue was found by a static analysis checker and confirmed by
manual source review.
Fixes:
|
||
|---|---|---|
| .. | ||
| framer | ||
| .gitignore | ||
| c101.c | ||
| farsync.c | ||
| farsync.h | ||
| fsl_qmc_hdlc.c | ||
| fsl_ucc_hdlc.c | ||
| fsl_ucc_hdlc.h | ||
| hd64570.c | ||
| hd64570.h | ||
| hd64572.c | ||
| hd64572.h | ||
| hdlc_cisco.c | ||
| hdlc_fr.c | ||
| hdlc_ppp.c | ||
| hdlc_raw_eth.c | ||
| hdlc_raw.c | ||
| hdlc_x25.c | ||
| hdlc.c | ||
| ixp4xx_hss.c | ||
| Kconfig | ||
| lapbether.c | ||
| Makefile | ||
| n2.c | ||
| pc300too.c | ||
| pci200syn.c | ||
| slic_ds26522.c | ||
| slic_ds26522.h | ||
| wanxl.c | ||
| wanxl.h | ||
| wanxlfw.inc_shipped | ||
| wanxlfw.S | ||