mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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: f2ae92780a ("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>
This commit is contained in:
parent
2f9339c052
commit
9197e5949a
1 changed files with 1 additions and 1 deletions
|
|
@ -848,7 +848,7 @@ static int ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci,
|
|||
{
|
||||
struct device *dev = ohci->card.device;
|
||||
unsigned int i;
|
||||
struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES];
|
||||
struct page *pages[AR_BUFFERS + AR_WRAPAROUND_PAGES] = { NULL };
|
||||
dma_addr_t dma_addrs[AR_BUFFERS];
|
||||
void *vaddr;
|
||||
struct descriptor *d;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue