Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'firewire-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fix from Takashi Sakamoto:
"A fix for PCI driver for Texas Instruments PCILyx series.

The driver had a bug where it allocated a DMA-coherent buffer of 16 KB
but released it using PAGE_SIZE. This disproportion was reported in
2020, but the fix was never merged. It is finally resolved"

* tag 'firewire-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
firewire: nosy: Fix dma_free_coherent() size

+5 -5
+5 -5
drivers/firewire/nosy.c
··· 36 36 37 37 static char driver_name[] = KBUILD_MODNAME; 38 38 39 + #define RCV_BUFFER_SIZE (16 * 1024) 40 + 39 41 /* this is the physical layout of a PCL, its size is 128 bytes */ 40 42 struct pcl { 41 43 __le32 next; ··· 519 517 lynx->rcv_start_pcl, lynx->rcv_start_pcl_bus); 520 518 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl), 521 519 lynx->rcv_pcl, lynx->rcv_pcl_bus); 522 - dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE, lynx->rcv_buffer, 523 - lynx->rcv_buffer_bus); 520 + dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE, 521 + lynx->rcv_buffer, lynx->rcv_buffer_bus); 524 522 525 523 iounmap(lynx->registers); 526 524 pci_disable_device(dev); 527 525 lynx_put(lynx); 528 526 } 529 - 530 - #define RCV_BUFFER_SIZE (16 * 1024) 531 527 532 528 static int 533 529 add_card(struct pci_dev *dev, const struct pci_device_id *unused) ··· 680 680 dma_free_coherent(&lynx->pci_device->dev, sizeof(struct pcl), 681 681 lynx->rcv_pcl, lynx->rcv_pcl_bus); 682 682 if (lynx->rcv_buffer) 683 - dma_free_coherent(&lynx->pci_device->dev, PAGE_SIZE, 683 + dma_free_coherent(&lynx->pci_device->dev, RCV_BUFFER_SIZE, 684 684 lynx->rcv_buffer, lynx->rcv_buffer_bus); 685 685 iounmap(lynx->registers); 686 686