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.

firewire: ohci: initialize page array to use alloc_pages_bulk() correctly

The call of alloc_pages_bulk() skips to fill entries of page array when
the entries already have values. While, 1394 OHCI PCI driver passes the
page array without initializing. It could cause invalid state at PFN
validation in vmap().

Fixes: f2ae92780ab9 ("firewire: ohci: split page allocation from dma mapping")
Reported-by: John Ogness <john.ogness@linutronix.de>
Reported-and-tested-by: Harald Arnesen <linux@skogtun.org>
Reported-and-tested-by: David Gow <david@davidgow.net>
Closes: https://lore.kernel.org/lkml/87tsv1vig5.fsf@jogness.linutronix.de/
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Takashi Sakamoto and committed by
Linus Torvalds
9197e594 2f9339c0

+1 -1
+1 -1
drivers/firewire/ohci.c
··· 848 848 { 849 849 struct device *dev = ohci->card.device; 850 850 unsigned int i; 851 - struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES]; 851 + struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES] = { NULL }; 852 852 dma_addr_t dma_addrs[AR_BUFFERS]; 853 853 void *vaddr; 854 854 struct descriptor *d;