All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/block/cpqarray.c: add missing cmd_free
@ 2012-04-22  9:15 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2012-04-22  9:15 UTC (permalink / raw)
  To: Chirag Kantharia; +Cc: kernel-janitors, iss_storagedev, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

Call cmd_free(h, c, 0); before leaving the function as done on all other
exit paths.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/block/cpqarray.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 9125bbe..db6f15d 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1334,6 +1334,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
 	case READ_FLASH_ROM:
 		if (copy_to_user(io->sg[0].addr, p, io->sg[0].size)) {
 			kfree(p);
+			cmd_free(h, c, 0);
 			return -EFAULT;
 		}
 		/* fall through and free p */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] drivers/block/cpqarray.c: add missing cmd_free
@ 2012-04-22  9:15 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2012-04-22  9:15 UTC (permalink / raw)
  To: Chirag Kantharia; +Cc: kernel-janitors, iss_storagedev, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

Call cmd_free(h, c, 0); before leaving the function as done on all other
exit paths.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/block/cpqarray.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 9125bbe..db6f15d 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1334,6 +1334,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
 	case READ_FLASH_ROM:
 		if (copy_to_user(io->sg[0].addr, p, io->sg[0].size)) {
 			kfree(p);
+			cmd_free(h, c, 0);
 			return -EFAULT;
 		}
 		/* fall through and free p */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/block/cpqarray.c: add missing cmd_free
  2012-04-22  9:15 ` Julia Lawall
@ 2012-04-23 15:01   ` Mike Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: Mike Miller @ 2012-04-23 15:01 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Chirag Kantharia, kernel-janitors, ISS StorageDev, linux-kernel

On 04/22/2012 04:15 AM, Julia Lawall wrote:
> From: Julia Lawall<Julia.Lawall@lip6.fr>
>
> Call cmd_free(h, c, 0); before leaving the function as done on all other
> exit paths.
>
> Signed-off-by: Julia Lawall<Julia.Lawall@lip6.fr>
Acked-by: Mike Miller <mike.miller@hp.com>
>
> ---
>   drivers/block/cpqarray.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
> index 9125bbe..db6f15d 100644
> --- a/drivers/block/cpqarray.c
> +++ b/drivers/block/cpqarray.c
> @@ -1334,6 +1334,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
>   	case READ_FLASH_ROM:
>   		if (copy_to_user(io->sg[0].addr, p, io->sg[0].size)) {
>   			kfree(p);
> +			cmd_free(h, c, 0);
>   			return -EFAULT;
>   		}
>   		/* fall through and free p */
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/block/cpqarray.c: add missing cmd_free
@ 2012-04-23 15:01   ` Mike Miller
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Miller @ 2012-04-23 15:01 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Chirag Kantharia, kernel-janitors, ISS StorageDev, linux-kernel

On 04/22/2012 04:15 AM, Julia Lawall wrote:
> From: Julia Lawall<Julia.Lawall@lip6.fr>
>
> Call cmd_free(h, c, 0); before leaving the function as done on all other
> exit paths.
>
> Signed-off-by: Julia Lawall<Julia.Lawall@lip6.fr>
Acked-by: Mike Miller <mike.miller@hp.com>
>
> ---
>   drivers/block/cpqarray.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
> index 9125bbe..db6f15d 100644
> --- a/drivers/block/cpqarray.c
> +++ b/drivers/block/cpqarray.c
> @@ -1334,6 +1334,7 @@ static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io)
>   	case READ_FLASH_ROM:
>   		if (copy_to_user(io->sg[0].addr, p, io->sg[0].size)) {
>   			kfree(p);
> +			cmd_free(h, c, 0);
>   			return -EFAULT;
>   		}
>   		/* fall through and free p */
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-23 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-22  9:15 [PATCH] drivers/block/cpqarray.c: add missing cmd_free Julia Lawall
2012-04-22  9:15 ` Julia Lawall
2012-04-23 15:01 ` Mike Miller
2012-04-23 15:01   ` Mike Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.