* [PATCH 4.1] target-core: fix return without a value
@ 2015-11-10 18:32 Mikulas Patocka
2015-11-10 18:56 ` Greg Kroah-Hartman
2015-11-11 12:15 ` [PATCH 4.1 v2] " Mikulas Patocka
0 siblings, 2 replies; 6+ messages in thread
From: Mikulas Patocka @ 2015-11-10 18:32 UTC (permalink / raw)
To: Nicholas Bellinger, Greg Kroah-Hartman, linux-stable
Cc: Martin Svec, Alex Gorbachev, linux-scsi, target-devel
Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
with no value, in function returning non-void [-Wreturn-type]
The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
adds a check if device_list is NULL. The patch adds a return statement
without a value to the function core_scsi3_pr_seq_non_holder that returns
int.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/target/target_core_pr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-4.1.13/drivers/target/target_core_pr.c
===================================================================
--- linux-4.1.13.orig/drivers/target/target_core_pr.c 2015-10-23 18:25:26.000000000 +0200
+++ linux-4.1.13/drivers/target/target_core_pr.c 2015-11-10 19:22:07.000000000 +0100
@@ -329,7 +329,7 @@ static int core_scsi3_pr_seq_non_holder(
* RESERVATION CONFLICT on some CDBs */
if (!se_sess->se_node_acl->device_list)
- return;
+ return -EINVAL;
se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun];
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4.1] target-core: fix return without a value
2015-11-10 18:32 [PATCH 4.1] target-core: fix return without a value Mikulas Patocka
@ 2015-11-10 18:56 ` Greg Kroah-Hartman
2015-11-10 23:31 ` Mikulas Patocka
2015-11-11 12:15 ` [PATCH 4.1 v2] " Mikulas Patocka
1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2015-11-10 18:56 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Nicholas Bellinger, linux-stable, Martin Svec, Alex Gorbachev,
linux-scsi, target-devel
On Tue, Nov 10, 2015 at 01:32:10PM -0500, Mikulas Patocka wrote:
> Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
> with no value, in function returning non-void [-Wreturn-type]
>
> The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
> adds a check if device_list is NULL. The patch adds a return statement
> without a value to the function core_scsi3_pr_seq_non_holder that returns
> int.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
>
> ---
> drivers/target/target_core_pr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4.1] target-core: fix return without a value
2015-11-10 18:56 ` Greg Kroah-Hartman
@ 2015-11-10 23:31 ` Mikulas Patocka
2015-11-11 0:00 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: Mikulas Patocka @ 2015-11-10 23:31 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Nicholas Bellinger, linux-stable, Martin Svec, Alex Gorbachev,
linux-scsi, target-devel
On Tue, 10 Nov 2015, Greg Kroah-Hartman wrote:
> On Tue, Nov 10, 2015 at 01:32:10PM -0500, Mikulas Patocka wrote:
> > Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
> > with no value, in function returning non-void [-Wreturn-type]
> >
> > The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
> > adds a check if device_list is NULL. The patch adds a return statement
> > without a value to the function core_scsi3_pr_seq_non_holder that returns
> > int.
> >
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> >
> > ---
> > drivers/target/target_core_pr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> for how to do this properly.
>
> </formletter>
This patch has no upstream equivalent (because the code in upstream was
already refactored), so none of the rules in stable_kernel_rules.txt apply
to it. The patch that broke it also has no upstream equivalent.
Documentation/stable_kernel_rules.txt
--- Option 1 ---
To have the patch automatically included in the stable tree, add the tag
Cc: stable@vger.kernel.org
in the sign-off area. Once the patch is merged it will be applied to
the stable tree without anything else needing to be done by the author
or subsystem maintainer.
--- Option 2 ---
After the patch has been merged to Linus' tree, send an email to
stable@vger.kernel.org containing the subject of the patch, the commit ID,
why you think it should be applied, and what kernel version you wish it to
be applied to.
--- Option 3 ---
Send the patch, after verifying that it follows the above rules, to
stable@vger.kernel.org. You must note the upstream commit ID in the
changelog of your submission, as well as the kernel version you wish
it to be applied to.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4.1] target-core: fix return without a value
2015-11-10 23:31 ` Mikulas Patocka
@ 2015-11-11 0:00 ` Greg Kroah-Hartman
2015-11-11 12:06 ` Mikulas Patocka
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2015-11-11 0:00 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Nicholas Bellinger, linux-stable, Martin Svec, Alex Gorbachev,
linux-scsi, target-devel
On Tue, Nov 10, 2015 at 06:31:47PM -0500, Mikulas Patocka wrote:
>
>
> On Tue, 10 Nov 2015, Greg Kroah-Hartman wrote:
>
> > On Tue, Nov 10, 2015 at 01:32:10PM -0500, Mikulas Patocka wrote:
> > > Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
> > > with no value, in function returning non-void [-Wreturn-type]
> > >
> > > The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
> > > adds a check if device_list is NULL. The patch adds a return statement
> > > without a value to the function core_scsi3_pr_seq_non_holder that returns
> > > int.
> > >
> > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > >
> > > ---
> > > drivers/target/target_core_pr.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > <formletter>
> >
> > This is not the correct way to submit patches for inclusion in the
> > stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> > for how to do this properly.
> >
> > </formletter>
>
> This patch has no upstream equivalent (because the code in upstream was
> already refactored), so none of the rules in stable_kernel_rules.txt apply
> to it. The patch that broke it also has no upstream equivalent.
>
Then you need to say that!
And the fact that a "please take this patch, it's correct but doesn't
apply to upstream" patch is now broken is proof of why I didn't want to
take it in the first place!
Ugh. How about I just revert the original patch and then you send me
backports of what is actually in Linus's tree so we don't have this
problem anymore?
Oh, and you got the stable mailing list address wrong as well :(
Please fix all of this up and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4.1] target-core: fix return without a value
2015-11-11 0:00 ` Greg Kroah-Hartman
@ 2015-11-11 12:06 ` Mikulas Patocka
0 siblings, 0 replies; 6+ messages in thread
From: Mikulas Patocka @ 2015-11-11 12:06 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Nicholas Bellinger, Martin Svec, Alex Gorbachev, linux-scsi,
target-devel, stable
On Tue, 10 Nov 2015, Greg Kroah-Hartman wrote:
> On Tue, Nov 10, 2015 at 06:31:47PM -0500, Mikulas Patocka wrote:
> >
> >
> > On Tue, 10 Nov 2015, Greg Kroah-Hartman wrote:
> >
> > > On Tue, Nov 10, 2015 at 01:32:10PM -0500, Mikulas Patocka wrote:
> > > > Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
> > > > with no value, in function returning non-void [-Wreturn-type]
> > > >
> > > > The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
> > > > adds a check if device_list is NULL. The patch adds a return statement
> > > > without a value to the function core_scsi3_pr_seq_non_holder that returns
> > > > int.
> > > >
> > > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > > >
> > > > ---
> > > > drivers/target/target_core_pr.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > <formletter>
> > >
> > > This is not the correct way to submit patches for inclusion in the
> > > stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> > > for how to do this properly.
> > >
> > > </formletter>
> >
> > This patch has no upstream equivalent (because the code in upstream was
> > already refactored), so none of the rules in stable_kernel_rules.txt apply
> > to it. The patch that broke it also has no upstream equivalent.
> >
>
> Then you need to say that!
>
> And the fact that a "please take this patch, it's correct but doesn't
> apply to upstream" patch is now broken is proof of why I didn't want to
> take it in the first place!
>
> Ugh. How about I just revert the original patch and then you send me
> backports of what is actually in Linus's tree so we don't have this
> problem anymore?
The original patch that caused this compilation warning fixes some
crashes, so you should not revert it. You can work with subsystem
maintainers on backporting the refactored code from upstream to 4.1 - I
don't know how hard or possible it is.
Mikulas
> Oh, and you got the stable mailing list address wrong as well :(
>
> Please fix all of this up and resend.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4.1 v2] target-core: fix return without a value
2015-11-10 18:32 [PATCH 4.1] target-core: fix return without a value Mikulas Patocka
2015-11-10 18:56 ` Greg Kroah-Hartman
@ 2015-11-11 12:15 ` Mikulas Patocka
1 sibling, 0 replies; 6+ messages in thread
From: Mikulas Patocka @ 2015-11-11 12:15 UTC (permalink / raw)
To: Nicholas Bellinger, Greg Kroah-Hartman, stable
Cc: Martin Svec, Alex Gorbachev, linux-scsi, target-devel
Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
with no value, in function returning non-void [-Wreturn-type]
The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
adds a check if device_list is NULL. The patch adds a return statement
without a value to the function core_scsi3_pr_seq_non_holder that returns
int.
This patch has no upstream equivalent because the patch 35afa656 that
introduced this bug has also no upstream equivalent. The code in upstream
was already refactored, so neither 35afa656 nor this patch is needed
there.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/target/target_core_pr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-4.1.13/drivers/target/target_core_pr.c
===================================================================
--- linux-4.1.13.orig/drivers/target/target_core_pr.c 2015-10-23 18:25:26.000000000 +0200
+++ linux-4.1.13/drivers/target/target_core_pr.c 2015-11-10 19:22:07.000000000 +0100
@@ -329,7 +329,7 @@ static int core_scsi3_pr_seq_non_holder(
* RESERVATION CONFLICT on some CDBs */
if (!se_sess->se_node_acl->device_list)
- return;
+ return -EINVAL;
se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun];
/*
k
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-11-11 12:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10 18:32 [PATCH 4.1] target-core: fix return without a value Mikulas Patocka
2015-11-10 18:56 ` Greg Kroah-Hartman
2015-11-10 23:31 ` Mikulas Patocka
2015-11-11 0:00 ` Greg Kroah-Hartman
2015-11-11 12:06 ` Mikulas Patocka
2015-11-11 12:15 ` [PATCH 4.1 v2] " Mikulas Patocka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox