linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
@ 2013-02-28  2:34 Chen Gang
  2013-03-01 13:43 ` Konrad Rzeszutek Wilk
  2013-04-03 12:56 ` William Dauchy
  0 siblings, 2 replies; 10+ messages in thread
From: Chen Gang @ 2013-02-28  2:34 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Jan Beulich, roger.pau,
	stefano.stabellini, dgdegra
  Cc: xen-devel, linux-kernel


  if call xen_vbd_translate failed, the preq.dev will be not initialized.
  so use blkif->vbd.pdevice instead (still better to print relative info).

additional information:
  before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
  here was bogus, as it was the guest provided value from req->u.rw.handle
  rather than the actual device.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
---
 drivers/block/xen-blkback/blkback.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index de1f319..6d1cc3d 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -904,7 +904,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
 		pr_debug(DRV_PFX "access denied: %s of [%llu,%llu] on dev=%04x\n",
 			 operation == READ ? "read" : "write",
 			 preq.sector_number,
-			 preq.sector_number + preq.nr_sects, preq.dev);
+			 preq.sector_number + preq.nr_sects,
+			 blkif->vbd.pdevice);
 		goto fail_response;
 	}
 
-- 
1.7.7.6

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-02-28  2:34 [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized Chen Gang
@ 2013-03-01 13:43 ` Konrad Rzeszutek Wilk
  2013-03-05  0:54   ` Chen Gang
  2013-04-03 12:56 ` William Dauchy
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-03-01 13:43 UTC (permalink / raw)
  To: Chen Gang
  Cc: Jan Beulich, roger.pau, stefano.stabellini, dgdegra, xen-devel,
	linux-kernel

On Thu, Feb 28, 2013 at 10:34:23AM +0800, Chen Gang wrote:
> 
>   if call xen_vbd_translate failed, the preq.dev will be not initialized.
>   so use blkif->vbd.pdevice instead (still better to print relative info).
> 
> additional information:
>   before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
>   here was bogus, as it was the guest provided value from req->u.rw.handle
>   rather than the actual device.

applied with some changes to the description.

> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Acked-by: Jan Beulich <JBeulich@suse.com>
> ---
>  drivers/block/xen-blkback/blkback.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index de1f319..6d1cc3d 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -904,7 +904,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
>  		pr_debug(DRV_PFX "access denied: %s of [%llu,%llu] on dev=%04x\n",
>  			 operation == READ ? "read" : "write",
>  			 preq.sector_number,
> -			 preq.sector_number + preq.nr_sects, preq.dev);
> +			 preq.sector_number + preq.nr_sects,
> +			 blkif->vbd.pdevice);
>  		goto fail_response;
>  	}
>  
> -- 
> 1.7.7.6

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-03-01 13:43 ` Konrad Rzeszutek Wilk
@ 2013-03-05  0:54   ` Chen Gang
  0 siblings, 0 replies; 10+ messages in thread
From: Chen Gang @ 2013-03-05  0:54 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Jan Beulich, roger.pau, stefano.stabellini, dgdegra, xen-devel,
	linux-kernel

于 2013年03月01日 21:43, Konrad Rzeszutek Wilk 写道:
> On Thu, Feb 28, 2013 at 10:34:23AM +0800, Chen Gang wrote:
>>
>>   if call xen_vbd_translate failed, the preq.dev will be not initialized.
>>   so use blkif->vbd.pdevice instead (still better to print relative info).
>>
>> additional information:
>>   before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
>>   here was bogus, as it was the guest provided value from req->u.rw.handle
>>   rather than the actual device.
> 
> applied with some changes to the description.
> 

  thanks.

>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> Acked-by: Jan Beulich <JBeulich@suse.com>
>> ---
>>  drivers/block/xen-blkback/blkback.c |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
>> index de1f319..6d1cc3d 100644
>> --- a/drivers/block/xen-blkback/blkback.c
>> +++ b/drivers/block/xen-blkback/blkback.c
>> @@ -904,7 +904,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
>>  		pr_debug(DRV_PFX "access denied: %s of [%llu,%llu] on dev=%04x\n",
>>  			 operation == READ ? "read" : "write",
>>  			 preq.sector_number,
>> -			 preq.sector_number + preq.nr_sects, preq.dev);
>> +			 preq.sector_number + preq.nr_sects,
>> +			 blkif->vbd.pdevice);
>>  		goto fail_response;
>>  	}
>>  
>> -- 
>> 1.7.7.6
> 
> 


-- 
Chen Gang

Asianux Corporation

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-02-28  2:34 [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized Chen Gang
  2013-03-01 13:43 ` Konrad Rzeszutek Wilk
@ 2013-04-03 12:56 ` William Dauchy
  2013-04-03 13:01   ` Jan Beulich
  1 sibling, 1 reply; 10+ messages in thread
From: William Dauchy @ 2013-04-03 12:56 UTC (permalink / raw)
  To: Chen Gang
  Cc: Konrad Rzeszutek Wilk, Jan Beulich, roger.pau,
	Stefano Stabellini, dgdegra, xen-devel, linux-kernel

Hello,

On Thu, Feb 28, 2013 at 3:34 AM, Chen Gang <gang.chen@asianux.com> wrote:
> additional information:
>   before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
>   here was bogus, as it was the guest provided value from req->u.rw.handle
>   rather than the actual device.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Acked-by: Jan Beulich <JBeulich@suse.com>

Sorry I'm a bit late but since since 01c681d is in stable, I guess
a72d900 (xen/xen-blkback: preq.dev is used without initialized)
could be added in stable as well.
Am I wrong? otherwise I'm ok to do the request.

Regards,

--
William

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 12:56 ` William Dauchy
@ 2013-04-03 13:01   ` Jan Beulich
  2013-04-03 13:25     ` William Dauchy
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2013-04-03 13:01 UTC (permalink / raw)
  To: Chen Gang, William Dauchy
  Cc: roger.pau, Stefano Stabellini, xen-devel, Konrad Rzeszutek Wilk,
	dgdegra, linux-kernel

>>> On 03.04.13 at 14:56, William Dauchy <wdauchy@gmail.com> wrote:
> On Thu, Feb 28, 2013 at 3:34 AM, Chen Gang <gang.chen@asianux.com> wrote:
>> additional information:
>>   before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
>>   here was bogus, as it was the guest provided value from req->u.rw.handle
>>   rather than the actual device.
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> Acked-by: Jan Beulich <JBeulich@suse.com>
> 
> Sorry I'm a bit late but since since 01c681d is in stable, I guess
> a72d900 (xen/xen-blkback: preq.dev is used without initialized)
> could be added in stable as well.
> Am I wrong? otherwise I'm ok to do the request.

Iirc we requested the earlier commit to be removed from stable
trees, and I think Greg also did so.

Jan


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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 13:01   ` Jan Beulich
@ 2013-04-03 13:25     ` William Dauchy
  2013-04-03 13:42       ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: William Dauchy @ 2013-04-03 13:25 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Chen Gang, roger.pau, Stefano Stabellini, xen-devel,
	Konrad Rzeszutek Wilk, dgdegra, linux-kernel

Hello Jan,

On Wed, Apr 3, 2013 at 3:01 PM, Jan Beulich <JBeulich@suse.com> wrote:
> Iirc we requested the earlier commit to be removed from stable
> trees, and I think Greg also did so.

I'm sorry but I'm unable to find a revert of 01c681d in stable tree.

Regards,
--
William

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 13:25     ` William Dauchy
@ 2013-04-03 13:42       ` Jan Beulich
  2013-04-03 13:56         ` William Dauchy
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2013-04-03 13:42 UTC (permalink / raw)
  To: William Dauchy
  Cc: Chen Gang, roger.pau, Stefano Stabellini, xen-devel,
	Konrad Rzeszutek Wilk, dgdegra, linux-kernel

>>> On 03.04.13 at 15:25, William Dauchy <wdauchy@gmail.com> wrote:
> On Wed, Apr 3, 2013 at 3:01 PM, Jan Beulich <JBeulich@suse.com> wrote:
>> Iirc we requested the earlier commit to be removed from stable
>> trees, and I think Greg also did so.
> 
> I'm sorry but I'm unable to find a revert of 01c681d in stable tree.

ChangeLog-3.8.3 for example has

commit 32f4d10ed8fd7ef4cebbf02c5326e8bb6aeca9b1
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Mar 12 15:08:26 2013 -0700

    Revert "xen/blkback: Don't trust the handle from the frontend."
    
    This reverts commit 01c681d4c70d64cb72142a2823f27c4146a02e63 upstream
    (ef56ca64ea733c3b88f0bb74b04da128b1dc35d8 in this tree), as it wasn't
    supposed to have been applied to the stable tree.
    
    Cc: Jan Beulich <jbeulich@suse.com>
    Cc: Ian Campbell <ian.campbell@citrix.com>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


Jan


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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 13:42       ` Jan Beulich
@ 2013-04-03 13:56         ` William Dauchy
  2013-04-03 14:34           ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: William Dauchy @ 2013-04-03 13:56 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Chen Gang, roger.pau, Stefano Stabellini, xen-devel,
	Konrad Rzeszutek Wilk, dgdegra, linux-kernel

On Wed, Apr 3, 2013 at 3:42 PM, Jan Beulich <JBeulich@suse.com> wrote:
> ChangeLog-3.8.3 for example has

oh sorry, you are right. I wasn't looking is the 3.8.x branch.
The thing is, the revert seems present only in 3.8.x branch. For
example in 3.4.x the last patch is still 01c681d
Should we consider this normal or is it a mistake?

--
William

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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 13:56         ` William Dauchy
@ 2013-04-03 14:34           ` Jan Beulich
  2013-04-03 16:37             ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2013-04-03 14:34 UTC (permalink / raw)
  To: William Dauchy
  Cc: Chen Gang, roger.pau, Stefano Stabellini, xen-devel,
	Konrad Rzeszutek Wilk, dgdegra, linux-kernel

>>> On 03.04.13 at 15:56, William Dauchy <wdauchy@gmail.com> wrote:
> On Wed, Apr 3, 2013 at 3:42 PM, Jan Beulich <JBeulich@suse.com> wrote:
>> ChangeLog-3.8.3 for example has
> 
> oh sorry, you are right. I wasn't looking is the 3.8.x branch.
> The thing is, the revert seems present only in 3.8.x branch. For
> example in 3.4.x the last patch is still 01c681d
> Should we consider this normal or is it a mistake?

I think it is a mistake, but ultimately it's Konrad's call.

Jan


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

* Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
  2013-04-03 14:34           ` Jan Beulich
@ 2013-04-03 16:37             ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-03 16:37 UTC (permalink / raw)
  To: Jan Beulich
  Cc: William Dauchy, Chen Gang, roger.pau, Stefano Stabellini,
	xen-devel, dgdegra, linux-kernel

On Wed, Apr 03, 2013 at 03:34:16PM +0100, Jan Beulich wrote:
> >>> On 03.04.13 at 15:56, William Dauchy <wdauchy@gmail.com> wrote:
> > On Wed, Apr 3, 2013 at 3:42 PM, Jan Beulich <JBeulich@suse.com> wrote:
> >> ChangeLog-3.8.3 for example has
> > 
> > oh sorry, you are right. I wasn't looking is the 3.8.x branch.
> > The thing is, the revert seems present only in 3.8.x branch. For
> > example in 3.4.x the last patch is still 01c681d
> > Should we consider this normal or is it a mistake?
> 
> I think it is a mistake, but ultimately it's Konrad's call.

It is a mistake. Please revert it if possible.
> 
> Jan
> 

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

end of thread, other threads:[~2013-04-03 16:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28  2:34 [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized Chen Gang
2013-03-01 13:43 ` Konrad Rzeszutek Wilk
2013-03-05  0:54   ` Chen Gang
2013-04-03 12:56 ` William Dauchy
2013-04-03 13:01   ` Jan Beulich
2013-04-03 13:25     ` William Dauchy
2013-04-03 13:42       ` Jan Beulich
2013-04-03 13:56         ` William Dauchy
2013-04-03 14:34           ` Jan Beulich
2013-04-03 16:37             ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).