[v2] passthrough: drop break statement following c/s cd7dedad820
diff mbox series

Message ID 1575548022-14213-1-git-send-email-igor.druzhinin@citrix.com
State New
Headers show
Series
  • [v2] passthrough: drop break statement following c/s cd7dedad820
Related show

Commit Message

Igor Druzhinin Dec. 5, 2019, 12:13 p.m. UTC
The locking responsibilities have changed and a premature break in
this section now causes the following assertion:

Assertion '!preempt_count()' failed at preempt.c:36

Suggested-by: Paul Durrant <pdurrant@amazon.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
 xen/drivers/passthrough/pci.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Paul Durrant Dec. 5, 2019, 12:20 p.m. UTC | #1
> -----Original Message-----
> From: Igor Druzhinin <igor.druzhinin@citrix.com>
> Sent: 05 December 2019 12:14
> To: xen-devel@lists.xenproject.org
> Cc: jbeulich@suse.com; linux@eikelenboom.it; Durrant, Paul
> <pdurrant@amazon.com>; Igor Druzhinin <igor.druzhinin@citrix.com>
> Subject: [PATCH v2] passthrough: drop break statement following c/s
> cd7dedad820
> 
> The locking responsibilities have changed and a premature break in
> this section now causes the following assertion:
> 
> Assertion '!preempt_count()' failed at preempt.c:36
> 
> Suggested-by: Paul Durrant <pdurrant@amazon.com>

Actually, it was suggested by Jan, but you can put my R-b on the patch.

  Paul

> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
>  xen/drivers/passthrough/pci.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index ced0c28..c07a639 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1705,7 +1705,6 @@ int iommu_do_pci_domctl(
>                         seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
>                  ret = -EINVAL;
>              }
> -            break;
>          }
>          else if ( !ret )
>              ret = assign_device(d, seg, bus, devfn, flags);
> --
> 2.7.4
Igor Druzhinin Dec. 5, 2019, 12:26 p.m. UTC | #2
On 05/12/2019 12:20, Durrant, Paul wrote:
>> -----Original Message-----
>> From: Igor Druzhinin <igor.druzhinin@citrix.com>
>> Sent: 05 December 2019 12:14
>> To: xen-devel@lists.xenproject.org
>> Cc: jbeulich@suse.com; linux@eikelenboom.it; Durrant, Paul
>> <pdurrant@amazon.com>; Igor Druzhinin <igor.druzhinin@citrix.com>
>> Subject: [PATCH v2] passthrough: drop break statement following c/s
>> cd7dedad820
>>
>> The locking responsibilities have changed and a premature break in
>> this section now causes the following assertion:
>>
>> Assertion '!preempt_count()' failed at preempt.c:36
>>
>> Suggested-by: Paul Durrant <pdurrant@amazon.com>
> 
> Actually, it was suggested by Jan, but you can put my R-b on the patch.
> 

Oh, indeed :) Please fix up while committing as you wish.

Igor
Jan Beulich Dec. 5, 2019, 12:27 p.m. UTC | #3
On 05.12.2019 13:20, Durrant, Paul wrote:
>> -----Original Message-----
>> From: Igor Druzhinin <igor.druzhinin@citrix.com>
>> Sent: 05 December 2019 12:14
>> To: xen-devel@lists.xenproject.org
>> Cc: jbeulich@suse.com; linux@eikelenboom.it; Durrant, Paul
>> <pdurrant@amazon.com>; Igor Druzhinin <igor.druzhinin@citrix.com>
>> Subject: [PATCH v2] passthrough: drop break statement following c/s
>> cd7dedad820
>>
>> The locking responsibilities have changed and a premature break in
>> this section now causes the following assertion:
>>
>> Assertion '!preempt_count()' failed at preempt.c:36
>>
>> Suggested-by: Paul Durrant <pdurrant@amazon.com>
> 
> Actually, it was suggested by Jan, but you can put my R-b on the patch.

And mine:
Reviewed-by: Jan Beulich <jbeulich@suse.com>

I'll get this committed soon.

Jan

Patch
diff mbox series

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index ced0c28..c07a639 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1705,7 +1705,6 @@  int iommu_do_pci_domctl(
                        seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 ret = -EINVAL;
             }
-            break;
         }
         else if ( !ret )
             ret = assign_device(d, seg, bus, devfn, flags);