mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
Merge tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire fix from Takashi Sakamoto: "Fix a NULL pointer dereference in 1394 OHCI PCI driver when probe() returns early with an error, as detected by Syzkaller" * tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: ohci: fix NULL pointer dereference in ar_context_release
This commit is contained in:
@@ -540,11 +540,13 @@ static void ar_context_link_page(struct ar_context *ctx, unsigned int index)
|
||||
|
||||
static void ar_context_release(struct ar_context *ctx)
|
||||
{
|
||||
struct device *dev = ctx->ohci->card.device;
|
||||
struct device *dev;
|
||||
|
||||
if (!ctx->buffer)
|
||||
return;
|
||||
|
||||
dev = ctx->ohci->card.device;
|
||||
|
||||
for (int i = 0; i < AR_BUFFERS; ++i) {
|
||||
dma_addr_t dma_addr = ctx->dma_addrs[i];
|
||||
if (dma_addr)
|
||||
|
||||
Reference in New Issue
Block a user