Skip to content

Commit 9197e59

Browse files
takaswietorvalds
authored andcommitted
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: f2ae927 ("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>
1 parent 2f9339c commit 9197e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firewire/ohci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ static int ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci,
848848
{
849849
struct device *dev = ohci->card.device;
850850
unsigned int i;
851-
struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES];
851+
struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES] = { NULL };
852852
dma_addr_t dma_addrs[AR_BUFFERS];
853853
void *vaddr;
854854
struct descriptor *d;

0 commit comments

Comments
 (0)