[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1415244343.3398.47.camel@decadent.org.uk>
Date: Thu, 06 Nov 2014 03:25:43 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] i2o: Fix DMA mapping leak in failure path of
i2o_cfg_passthru32()
If i2o_dma_alloc() fails then we don't free any DMA mappings already
allocated. i2o_cfg_passthru() does not have this bug.
Compile-tested only.
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/message/i2o/i2o_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 04bd3b6..274235d 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -630,7 +630,7 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
"%s:Bad SG element %d - not simple (%x)\n",
c->name, i, sg[i].flag_count);
rcode = -EINVAL;
- goto cleanup;
+ goto sg_list_cleanup;
}
sg_size = sg[i].flag_count & 0xffffff;
p = &(sg_list[sg_index]);
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists