netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
@ 2022-12-20 14:02 Cindy Lu
  2022-12-21  3:23 ` Jason Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Cindy Lu @ 2022-12-20 14:02 UTC (permalink / raw)
  To: lulu, jasowang, mst, kvm, linux-kernel, virtualization, netdev; +Cc: stable

The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
But some function was not changed while calling this function.
Add this change

Cc: stable@vger.kernel.org
Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 drivers/vhost/vdpa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 46ce35bea705..ec32f785dfde 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
 static dev_t vhost_vdpa_major;
 
 static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
-				   struct vhost_iotlb *iotlb,
-				   u64 start, u64 last);
+				   struct vhost_iotlb *iotlb, u64 start,
+				   u64 last, u32 asid);
 
 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
 {
@@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
 		return -EINVAL;
 
 	hlist_del(&as->hash_link);
-	vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
+	vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
 	kfree(as);
 
 	return 0;
-- 
2.34.3


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

* Re: [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
  2022-12-20 14:02 [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f Cindy Lu
@ 2022-12-21  3:23 ` Jason Wang
  2022-12-21  5:58   ` Cindy Lu
  2022-12-21  6:35   ` Michael S. Tsirkin
  0 siblings, 2 replies; 6+ messages in thread
From: Jason Wang @ 2022-12-21  3:23 UTC (permalink / raw)
  To: Cindy Lu; +Cc: mst, kvm, linux-kernel, virtualization, netdev, stable

On Tue, Dec 20, 2022 at 10:02 PM Cindy Lu <lulu@redhat.com> wrote:
>
> The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
> But some function was not changed while calling this function.
> Add this change
>
> Cc: stable@vger.kernel.org
> Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")

Is this commit merged into Linus tree?

Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy
can squash the fix into the new version?

Thanks

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Cindy Lu <lulu@redhat.com>
> ---
>  drivers/vhost/vdpa.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 46ce35bea705..ec32f785dfde 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
>  static dev_t vhost_vdpa_major;
>
>  static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
> -                                  struct vhost_iotlb *iotlb,
> -                                  u64 start, u64 last);
> +                                  struct vhost_iotlb *iotlb, u64 start,
> +                                  u64 last, u32 asid);
>
>  static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
>  {
> @@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
>                 return -EINVAL;
>
>         hlist_del(&as->hash_link);
> -       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
> +       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
>         kfree(as);
>
>         return 0;
> --
> 2.34.3
>


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

* Re: [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
  2022-12-21  3:23 ` Jason Wang
@ 2022-12-21  5:58   ` Cindy Lu
  2022-12-21  6:36     ` Michael S. Tsirkin
  2022-12-21  6:35   ` Michael S. Tsirkin
  1 sibling, 1 reply; 6+ messages in thread
From: Cindy Lu @ 2022-12-21  5:58 UTC (permalink / raw)
  To: Jason Wang; +Cc: mst, kvm, linux-kernel, virtualization, netdev, stable

On Wed, 21 Dec 2022 at 11:23, Jason Wang <jasowang@redhat.com> wrote:
>
> On Tue, Dec 20, 2022 at 10:02 PM Cindy Lu <lulu@redhat.com> wrote:
> >
> > The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
> > But some function was not changed while calling this function.
> > Add this change
> >
> > Cc: stable@vger.kernel.org
> > Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
>
> Is this commit merged into Linus tree?
>
> Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy
> can squash the fix into the new version?
>
> Thanks
>
This is not merged in linus tree, and this compile issue was hit in mst's tree
should I send a new version squash the patch and the fix?

Thanks
Cindy
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Cindy Lu <lulu@redhat.com>
> > ---
> >  drivers/vhost/vdpa.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > index 46ce35bea705..ec32f785dfde 100644
> > --- a/drivers/vhost/vdpa.c
> > +++ b/drivers/vhost/vdpa.c
> > @@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
> >  static dev_t vhost_vdpa_major;
> >
> >  static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
> > -                                  struct vhost_iotlb *iotlb,
> > -                                  u64 start, u64 last);
> > +                                  struct vhost_iotlb *iotlb, u64 start,
> > +                                  u64 last, u32 asid);
> >
> >  static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
> >  {
> > @@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
> >                 return -EINVAL;
> >
> >         hlist_del(&as->hash_link);
> > -       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
> > +       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
> >         kfree(as);
> >
> >         return 0;
> > --
> > 2.34.3
> >
>


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

* Re: [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
  2022-12-21  3:23 ` Jason Wang
  2022-12-21  5:58   ` Cindy Lu
@ 2022-12-21  6:35   ` Michael S. Tsirkin
  2022-12-21  6:48     ` Jason Wang
  1 sibling, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2022-12-21  6:35 UTC (permalink / raw)
  To: Jason Wang; +Cc: Cindy Lu, kvm, linux-kernel, virtualization, netdev, stable

On Wed, Dec 21, 2022 at 11:23:09AM +0800, Jason Wang wrote:
> On Tue, Dec 20, 2022 at 10:02 PM Cindy Lu <lulu@redhat.com> wrote:
> >
> > The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
> > But some function was not changed while calling this function.
> > Add this change
> >
> > Cc: stable@vger.kernel.org
> > Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
> 
> Is this commit merged into Linus tree?
> 
> Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy
> can squash the fix into the new version?
> 
> Thanks

Thanks, I fixed it myself already. Why do you want a respin?
That will mean trouble as the fixed patch is now being tested.


> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Cindy Lu <lulu@redhat.com>
> > ---
> >  drivers/vhost/vdpa.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > index 46ce35bea705..ec32f785dfde 100644
> > --- a/drivers/vhost/vdpa.c
> > +++ b/drivers/vhost/vdpa.c
> > @@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
> >  static dev_t vhost_vdpa_major;
> >
> >  static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
> > -                                  struct vhost_iotlb *iotlb,
> > -                                  u64 start, u64 last);
> > +                                  struct vhost_iotlb *iotlb, u64 start,
> > +                                  u64 last, u32 asid);
> >
> >  static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
> >  {
> > @@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
> >                 return -EINVAL;
> >
> >         hlist_del(&as->hash_link);
> > -       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
> > +       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
> >         kfree(as);
> >
> >         return 0;
> > --
> > 2.34.3
> >


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

* Re: [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
  2022-12-21  5:58   ` Cindy Lu
@ 2022-12-21  6:36     ` Michael S. Tsirkin
  0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2022-12-21  6:36 UTC (permalink / raw)
  To: Cindy Lu; +Cc: Jason Wang, kvm, linux-kernel, virtualization, netdev, stable

On Wed, Dec 21, 2022 at 01:58:11PM +0800, Cindy Lu wrote:
> On Wed, 21 Dec 2022 at 11:23, Jason Wang <jasowang@redhat.com> wrote:
> >
> > On Tue, Dec 20, 2022 at 10:02 PM Cindy Lu <lulu@redhat.com> wrote:
> > >
> > > The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
> > > But some function was not changed while calling this function.
> > > Add this change
> > >
> > > Cc: stable@vger.kernel.org
> > > Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
> >
> > Is this commit merged into Linus tree?
> >
> > Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy
> > can squash the fix into the new version?
> >
> > Thanks
> >
> This is not merged in linus tree, and this compile issue was hit in mst's tree
> should I send a new version squash the patch and the fix?
> 
> Thanks
> Cindy

No I fixed it myself. Pls check my tree now if it's not ok let me know.
Thanks!

> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Cindy Lu <lulu@redhat.com>
> > > ---
> > >  drivers/vhost/vdpa.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > > index 46ce35bea705..ec32f785dfde 100644
> > > --- a/drivers/vhost/vdpa.c
> > > +++ b/drivers/vhost/vdpa.c
> > > @@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
> > >  static dev_t vhost_vdpa_major;
> > >
> > >  static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
> > > -                                  struct vhost_iotlb *iotlb,
> > > -                                  u64 start, u64 last);
> > > +                                  struct vhost_iotlb *iotlb, u64 start,
> > > +                                  u64 last, u32 asid);
> > >
> > >  static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
> > >  {
> > > @@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
> > >                 return -EINVAL;
> > >
> > >         hlist_del(&as->hash_link);
> > > -       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
> > > +       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
> > >         kfree(as);
> > >
> > >         return 0;
> > > --
> > > 2.34.3
> > >
> >


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

* Re: [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f
  2022-12-21  6:35   ` Michael S. Tsirkin
@ 2022-12-21  6:48     ` Jason Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Wang @ 2022-12-21  6:48 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cindy Lu, kvm, linux-kernel, virtualization, netdev, stable

On Wed, Dec 21, 2022 at 2:35 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Wed, Dec 21, 2022 at 11:23:09AM +0800, Jason Wang wrote:
> > On Tue, Dec 20, 2022 at 10:02 PM Cindy Lu <lulu@redhat.com> wrote:
> > >
> > > The input of  vhost_vdpa_iotlb_unmap() was changed in 881ac7d2314f,
> > > But some function was not changed while calling this function.
> > > Add this change
> > >
> > > Cc: stable@vger.kernel.org
> > > Fixes: 881ac7d2314f ("vhost_vdpa: fix the crash in unmap a large memory")
> >
> > Is this commit merged into Linus tree?
> >
> > Btw, Michael, I'd expect there's a respin of the patch so maybe Cindy
> > can squash the fix into the new version?
> >
> > Thanks
>
> Thanks, I fixed it myself already. Why do you want a respin?

For some reason I miss v4, so it should be fine.

Thanks

> That will mean trouble as the fixed patch is now being tested.
>
>
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Signed-off-by: Cindy Lu <lulu@redhat.com>
> > > ---
> > >  drivers/vhost/vdpa.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > > index 46ce35bea705..ec32f785dfde 100644
> > > --- a/drivers/vhost/vdpa.c
> > > +++ b/drivers/vhost/vdpa.c
> > > @@ -66,8 +66,8 @@ static DEFINE_IDA(vhost_vdpa_ida);
> > >  static dev_t vhost_vdpa_major;
> > >
> > >  static void vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v,
> > > -                                  struct vhost_iotlb *iotlb,
> > > -                                  u64 start, u64 last);
> > > +                                  struct vhost_iotlb *iotlb, u64 start,
> > > +                                  u64 last, u32 asid);
> > >
> > >  static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb)
> > >  {
> > > @@ -139,7 +139,7 @@ static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
> > >                 return -EINVAL;
> > >
> > >         hlist_del(&as->hash_link);
> > > -       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1);
> > > +       vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
> > >         kfree(as);
> > >
> > >         return 0;
> > > --
> > > 2.34.3
> > >
>


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

end of thread, other threads:[~2022-12-21  6:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 14:02 [PATCH] vhost_vdpa: fix the compile issue in commit 881ac7d2314f Cindy Lu
2022-12-21  3:23 ` Jason Wang
2022-12-21  5:58   ` Cindy Lu
2022-12-21  6:36     ` Michael S. Tsirkin
2022-12-21  6:35   ` Michael S. Tsirkin
2022-12-21  6:48     ` Jason Wang

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).