* [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-19 18:22 Quentin Lambert
0 siblings, 0 replies; 27+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:22 UTC (permalink / raw)
To: Juergen Gross, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
Cc: Quentin Lambert
Most error branches following the call to kmalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
drivers/scsi/xen-scsifront.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
if (scsifront_enter(info)) {
spin_unlock_irq(host->host_lock);
+ kfree(shadow);
return FAILED;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-12-06 5:45 ` Juergen Gross
(?)
@ 2016-12-06 10:22 ` Dan Carpenter
-1 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-06 10:22 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
Oops. Sorry for the noise.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-12-06 10:22 ` Dan Carpenter
0 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-06 10:22 UTC (permalink / raw)
To: Juergen Gross
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
Oops. Sorry for the noise.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-12-06 10:22 ` Dan Carpenter
0 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-06 10:22 UTC (permalink / raw)
To: Juergen Gross
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
Oops. Sorry for the noise.
regards,
dan carpenter
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-12-05 20:53 ` Dan Carpenter
@ 2016-12-06 5:45 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-12-06 5:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 05/12/16 21:53, Dan Carpenter wrote:
> On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
>> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain
>>> a call to kfree. This patch add these calls where they are
>>> missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>>
>> Nice catch. I think this will need some more work, I'll do a
>> follow-on patch.
>>
>
> The error handling is really weird. Could you send your follow on to
> this thread?
I did:
https://lkml.org/lkml/2016/12/2/17
Juergen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-12-06 5:45 ` Juergen Gross
0 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-12-06 5:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 05/12/16 21:53, Dan Carpenter wrote:
> On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
>> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain
>>> a call to kfree. This patch add these calls where they are
>>> missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>>
>> Nice catch. I think this will need some more work, I'll do a
>> follow-on patch.
>>
>
> The error handling is really weird. Could you send your follow on to
> this thread?
I did:
https://lkml.org/lkml/2016/12/2/17
Juergen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-12-05 20:53 ` Dan Carpenter
(?)
(?)
@ 2016-12-06 5:45 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-12-06 5:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
On 05/12/16 21:53, Dan Carpenter wrote:
> On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
>> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain
>>> a call to kfree. This patch add these calls where they are
>>> missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>>
>> Nice catch. I think this will need some more work, I'll do a
>> follow-on patch.
>>
>
> The error handling is really weird. Could you send your follow on to
> this thread?
I did:
https://lkml.org/lkml/2016/12/2/17
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
@ 2016-12-05 20:53 ` Dan Carpenter
-1 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-05 20:53 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
>
The error handling is really weird. Could you send your follow on to
this thread?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-12-05 20:53 ` Dan Carpenter
0 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-05 20:53 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
>
The error handling is really weird. Could you send your follow on to
this thread?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
` (4 preceding siblings ...)
(?)
@ 2016-12-05 20:53 ` Dan Carpenter
-1 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-12-05 20:53 UTC (permalink / raw)
To: Juergen Gross
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
>
The error handling is really weird. Could you send your follow on to
this thread?
regards,
dan carpenter
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
@ 2016-11-25 21:28 ` Dan Carpenter
-1 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-11-25 21:28 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
Yeah. It's weird how we free it on the success path and all the failure
paths except one. But it looks so deliberate. What's going on with
that?
Could you send your follow on patch as a reply to the thread?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-25 21:28 ` Dan Carpenter
0 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-11-25 21:28 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
Yeah. It's weird how we free it on the success path and all the failure
paths except one. But it looks so deliberate. What's going on with
that?
Could you send your follow on patch as a reply to the thread?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
` (2 preceding siblings ...)
(?)
@ 2016-11-25 21:28 ` Dan Carpenter
-1 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2016-11-25 21:28 UTC (permalink / raw)
To: Juergen Gross
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote:
> On 19/11/16 19:22, Quentin Lambert wrote:
> > Most error branches following the call to kmalloc contain
> > a call to kfree. This patch add these calls where they are
> > missing.
> >
> > This issue was found with Hector.
> >
> > Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Nice catch. I think this will need some more work, I'll do a
> follow-on patch.
Yeah. It's weird how we free it on the success path and all the failure
paths except one. But it looks so deliberate. What's going on with
that?
Could you send your follow on patch as a reply to the thread?
regards,
dan carpenter
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-19 18:22 ` Quentin Lambert
@ 2016-11-24 8:24 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-24 8:24 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Applied to xen/tip.git for-linus-4.10
Juergen
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-24 8:24 ` Juergen Gross
0 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-24 8:24 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Applied to xen/tip.git for-linus-4.10
Juergen
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-19 18:22 ` Quentin Lambert
` (2 preceding siblings ...)
(?)
@ 2016-11-24 8:24 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-24 8:24 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Applied to xen/tip.git for-linus-4.10
Juergen
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-22 3:40 ` Martin K. Petersen
@ 2016-11-22 5:19 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-22 5:19 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, xen-devel, linux-scsi, linux-kernel,
kernel-janitors
On 22/11/16 04:40, Martin K. Petersen wrote:
>>>>>> "Juergen" == Juergen Gross <jgross@suse.com> writes:
>
> Juergen,
>
> Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain a call to
>>> kfree. This patch add these calls where they are missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Juergen> Nice catch. I think this will need some more work, I'll do a
> Juergen> follow-on patch.
>
> Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
>
> Are you taking this patch through the Xen tree or should I queue it up?
I'm taking it through the xen tree, thanks.
Juergen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-22 5:19 ` Juergen Gross
0 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-22 5:19 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, xen-devel, linux-scsi, linux-kernel,
kernel-janitors
On 22/11/16 04:40, Martin K. Petersen wrote:
>>>>>> "Juergen" = Juergen Gross <jgross@suse.com> writes:
>
> Juergen,
>
> Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain a call to
>>> kfree. This patch add these calls where they are missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Juergen> Nice catch. I think this will need some more work, I'll do a
> Juergen> follow-on patch.
>
> Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
>
> Are you taking this patch through the Xen tree or should I queue it up?
I'm taking it through the xen tree, thanks.
Juergen
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-22 3:40 ` Martin K. Petersen
(?)
@ 2016-11-22 5:19 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-22 5:19 UTC (permalink / raw)
To: Martin K. Petersen
Cc: James E.J. Bottomley, linux-scsi, Quentin Lambert,
kernel-janitors, linux-kernel, David Vrabel, xen-devel,
Boris Ostrovsky
On 22/11/16 04:40, Martin K. Petersen wrote:
>>>>>> "Juergen" == Juergen Gross <jgross@suse.com> writes:
>
> Juergen,
>
> Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>>> Most error branches following the call to kmalloc contain a call to
>>> kfree. This patch add these calls where they are missing.
>>>
>>> This issue was found with Hector.
>>>
>>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>
> Juergen> Nice catch. I think this will need some more work, I'll do a
> Juergen> follow-on patch.
>
> Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
>
> Are you taking this patch through the Xen tree or should I queue it up?
I'm taking it through the xen tree, thanks.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
@ 2016-11-22 3:40 ` Martin K. Petersen
-1 siblings, 0 replies; 27+ messages in thread
From: Martin K. Petersen @ 2016-11-22 3:40 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
>>>>> "Juergen" == Juergen Gross <jgross@suse.com> writes:
Juergen,
Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>> Most error branches following the call to kmalloc contain a call to
>> kfree. This patch add these calls where they are missing.
>>
>> This issue was found with Hector.
>>
>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Juergen> Nice catch. I think this will need some more work, I'll do a
Juergen> follow-on patch.
Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
Are you taking this patch through the Xen tree or should I queue it up?
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-22 3:40 ` Martin K. Petersen
0 siblings, 0 replies; 27+ messages in thread
From: Martin K. Petersen @ 2016-11-22 3:40 UTC (permalink / raw)
To: Juergen Gross
Cc: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
>>>>> "Juergen" = Juergen Gross <jgross@suse.com> writes:
Juergen,
Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>> Most error branches following the call to kmalloc contain a call to
>> kfree. This patch add these calls where they are missing.
>>
>> This issue was found with Hector.
>>
>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Juergen> Nice catch. I think this will need some more work, I'll do a
Juergen> follow-on patch.
Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
Are you taking this patch through the Xen tree or should I queue it up?
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-21 6:01 ` Juergen Gross
(?)
@ 2016-11-22 3:40 ` Martin K. Petersen
-1 siblings, 0 replies; 27+ messages in thread
From: Martin K. Petersen @ 2016-11-22 3:40 UTC (permalink / raw)
To: Juergen Gross
Cc: James E.J. Bottomley, linux-scsi, Martin K. Petersen,
Quentin Lambert, kernel-janitors, linux-kernel, David Vrabel,
xen-devel, Boris Ostrovsky
>>>>> "Juergen" == Juergen Gross <jgross@suse.com> writes:
Juergen,
Juergen> On 19/11/16 19:22, Quentin Lambert wrote:
>> Most error branches following the call to kmalloc contain a call to
>> kfree. This patch add these calls where they are missing.
>>
>> This issue was found with Hector.
>>
>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Juergen> Nice catch. I think this will need some more work, I'll do a
Juergen> follow-on patch.
Juergen> Reviewed-by: Juergen Gross <jgross@suse.com>
Are you taking this patch through the Xen tree or should I queue it up?
--
Martin K. Petersen Oracle Linux Engineering
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-19 18:22 ` Quentin Lambert
@ 2016-11-21 6:01 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-21 6:01 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Nice catch. I think this will need some more work, I'll do a
follow-on patch.
Reviewed-by: Juergen Gross <jgross@suse.com>
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-21 6:01 ` Juergen Gross
0 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-21 6:01 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Nice catch. I think this will need some more work, I'll do a
follow-on patch.
Reviewed-by: Juergen Gross <jgross@suse.com>
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] xen-scsifront: Add a missing call to kfree
2016-11-19 18:22 ` Quentin Lambert
(?)
@ 2016-11-21 6:01 ` Juergen Gross
-1 siblings, 0 replies; 27+ messages in thread
From: Juergen Gross @ 2016-11-21 6:01 UTC (permalink / raw)
To: Quentin Lambert, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
On 19/11/16 19:22, Quentin Lambert wrote:
> Most error branches following the call to kmalloc contain
> a call to kfree. This patch add these calls where they are
> missing.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Nice catch. I think this will need some more work, I'll do a
follow-on patch.
Reviewed-by: Juergen Gross <jgross@suse.com>
>
> ---
> drivers/scsi/xen-scsifront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/drivers/scsi/xen-scsifront.c
> +++ b/drivers/scsi/xen-scsifront.c
> @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
>
> if (scsifront_enter(info)) {
> spin_unlock_irq(host->host_lock);
> + kfree(shadow);
> return FAILED;
> }
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-19 18:22 ` Quentin Lambert
0 siblings, 0 replies; 27+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:22 UTC (permalink / raw)
To: Juergen Gross, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
Cc: Quentin Lambert
Most error branches following the call to kmalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
drivers/scsi/xen-scsifront.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
if (scsifront_enter(info)) {
spin_unlock_irq(host->host_lock);
+ kfree(shadow);
return FAILED;
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-19 18:22 ` Quentin Lambert
0 siblings, 0 replies; 27+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:22 UTC (permalink / raw)
To: Juergen Gross, Boris Ostrovsky, David Vrabel,
James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
linux-kernel, kernel-janitors
Cc: Quentin Lambert
Most error branches following the call to kmalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
drivers/scsi/xen-scsifront.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
if (scsifront_enter(info)) {
spin_unlock_irq(host->host_lock);
+ kfree(shadow);
return FAILED;
}
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2016-12-06 10:24 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 18:22 [PATCH] xen-scsifront: Add a missing call to kfree Quentin Lambert
-- strict thread matches above, loose matches on Subject: below --
2016-11-19 18:22 Quentin Lambert
2016-11-19 18:22 ` Quentin Lambert
2016-11-21 6:01 ` Juergen Gross
2016-11-21 6:01 ` Juergen Gross
2016-11-21 6:01 ` Juergen Gross
2016-11-22 3:40 ` Martin K. Petersen
2016-11-22 3:40 ` Martin K. Petersen
2016-11-22 3:40 ` Martin K. Petersen
2016-11-22 5:19 ` Juergen Gross
2016-11-22 5:19 ` Juergen Gross
2016-11-22 5:19 ` Juergen Gross
2016-11-25 21:28 ` Dan Carpenter
2016-11-25 21:28 ` Dan Carpenter
2016-11-25 21:28 ` Dan Carpenter
2016-12-05 20:53 ` Dan Carpenter
2016-12-05 20:53 ` Dan Carpenter
2016-12-05 20:53 ` Dan Carpenter
2016-12-06 5:45 ` Juergen Gross
2016-12-06 5:45 ` Juergen Gross
2016-12-06 10:22 ` Dan Carpenter
2016-12-06 10:22 ` Dan Carpenter
2016-12-06 10:22 ` Dan Carpenter
2016-12-06 5:45 ` Juergen Gross
2016-11-24 8:24 ` Juergen Gross
2016-11-24 8:24 ` Juergen Gross
2016-11-24 8:24 ` Juergen Gross
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.