History

Merge tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull ATA fix from Damien Le Moal: "A single fix to avoid a NULL pointer dereference in the pata_marvell driver with adapters not supporting DMA, from Zheyu" * tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: pata_marvell: Check the 'bmdma_addr' beforing reading

Linus Torvalds committed 4 years ago

Commit 2e5991f2 parents bb4ce2c aafa9f91 file · +2 −0Browse files

Unified · Split

drivers/ata/pata_marvell.c+2−0
@@ -77,6 +77,8 @@ static int marvell_cable_detect(struct ata_port *ap) · 76 unmodified lines
7777 switch(ap->port_no)
7878 {
7979 case 0:
80+ if (!ap->ioaddr.bmdma_addr)
81+ return ATA_CBL_PATA_UNK;
8082 if (ioread8(ap->ioaddr.bmdma_addr + 1) & 1)
8183 return ATA_CBL_PATA40;
8284 return ATA_CBL_PATA80;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t