public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers
@ 2013-08-26 21:08 K. Y. Srinivasan
  2013-08-26 21:56 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: K. Y. Srinivasan @ 2013-08-26 21:08 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan, stable

The channel state should be correctly set before registering the device. In the current
code the driver probe would fail for channels that have been rescinded and subsequently
re-offered. Fix the bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
---
 drivers/hv/channel_mgmt.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 12ec8c8..bbff5f2 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -293,6 +293,13 @@ static void vmbus_process_offer(struct work_struct *work)
 	}
 
 	/*
+	 * This state is used to indicate a successful open
+	 * so that when we do close the channel normally, we
+	 * can cleanup properly
+	 */
+	newchannel->state = CHANNEL_OPEN_STATE;
+
+	/*
 	 * Start the process of binding this offer to the driver
 	 * We need to set the DeviceObject field before calling
 	 * vmbus_child_dev_add()
@@ -318,13 +325,6 @@ static void vmbus_process_offer(struct work_struct *work)
 		kfree(newchannel->device_obj);
 
 		free_channel(newchannel);
-	} else {
-		/*
-		 * This state is used to indicate a successful open
-		 * so that when we do close the channel normally, we
-		 * can cleanup properly
-		 */
-		newchannel->state = CHANNEL_OPEN_STATE;
 	}
 }
 
-- 
1.7.4.1


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

* Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers
  2013-08-26 21:08 [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers K. Y. Srinivasan
@ 2013-08-26 21:56 ` Greg KH
  2013-08-26 22:48   ` KY Srinivasan
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2013-08-26 21:56 UTC (permalink / raw)
  To: K. Y. Srinivasan; +Cc: linux-kernel, devel, olaf, apw, jasowang, stable

On Mon, Aug 26, 2013 at 02:08:58PM -0700, K. Y. Srinivasan wrote:
> The channel state should be correctly set before registering the device. In the current
> code the driver probe would fail for channels that have been rescinded and subsequently
> re-offered. Fix the bug.
> 
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Cc: <stable@vger.kernel.org>

What older kernel versions have this bug?  When did it show up?

thanks,

greg k-h

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

* RE: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers
  2013-08-26 21:56 ` Greg KH
@ 2013-08-26 22:48   ` KY Srinivasan
  2013-08-26 23:13     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: KY Srinivasan @ 2013-08-26 22:48 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com,
	stable@vger.kernel.org



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Monday, August 26, 2013 2:57 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com; stable@vger.kernel.org
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel
> offers
> 
> On Mon, Aug 26, 2013 at 02:08:58PM -0700, K. Y. Srinivasan wrote:
> > The channel state should be correctly set before registering the device. In the
> current
> > code the driver probe would fail for channels that have been rescinded and
> subsequently
> > re-offered. Fix the bug.
> >
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > Cc: <stable@vger.kernel.org>
> 
> What older kernel versions have this bug?  When did it show up?

The patch that introduced the bug is:

commit e68d2971d26577b932a16333ce165af98a96e068
Author: K. Y. Srinivasan <kys@microsoft.com>
Date:   Thu May 23 12:02:32 2013 -0700

    Drivers: hv: vmbus: Implement multi-channel support

I think 3.10 shipped with this bug.

Regards,

K. Y
> 
> thanks,
> 
> greg k-h

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

* Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers
  2013-08-26 22:48   ` KY Srinivasan
@ 2013-08-26 23:13     ` Greg KH
  2013-08-26 23:21       ` KY Srinivasan
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2013-08-26 23:13 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com,
	stable@vger.kernel.org

On Mon, Aug 26, 2013 at 10:48:16PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Monday, August 26, 2013 2:57 PM
> > To: KY Srinivasan
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> > apw@canonical.com; jasowang@redhat.com; stable@vger.kernel.org
> > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel
> > offers
> > 
> > On Mon, Aug 26, 2013 at 02:08:58PM -0700, K. Y. Srinivasan wrote:
> > > The channel state should be correctly set before registering the device. In the
> > current
> > > code the driver probe would fail for channels that have been rescinded and
> > subsequently
> > > re-offered. Fix the bug.
> > >
> > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > Cc: <stable@vger.kernel.org>
> > 
> > What older kernel versions have this bug?  When did it show up?
> 
> The patch that introduced the bug is:
> 
> commit e68d2971d26577b932a16333ce165af98a96e068
> Author: K. Y. Srinivasan <kys@microsoft.com>
> Date:   Thu May 23 12:02:32 2013 -0700
> 
>     Drivers: hv: vmbus: Implement multi-channel support
> 
> I think 3.10 shipped with this bug.

Why do you think that, it's not what git shows:
	$ git describe --contains e68d2971d26577b932a16333ce165af98a96e068
	v3.11-rc1~157^2~64

So this is a 3.11-only thing, right?

thanks,

greg k-h

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

* RE: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers
  2013-08-26 23:13     ` Greg KH
@ 2013-08-26 23:21       ` KY Srinivasan
  0 siblings, 0 replies; 5+ messages in thread
From: KY Srinivasan @ 2013-08-26 23:21 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
	olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com,
	stable@vger.kernel.org



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Monday, August 26, 2013 4:14 PM
> To: KY Srinivasan
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com; stable@vger.kernel.org
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel
> offers
> 
> On Mon, Aug 26, 2013 at 10:48:16PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > > Sent: Monday, August 26, 2013 2:57 PM
> > > To: KY Srinivasan
> > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> olaf@aepfle.de;
> > > apw@canonical.com; jasowang@redhat.com; stable@vger.kernel.org
> > > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of
> channel
> > > offers
> > >
> > > On Mon, Aug 26, 2013 at 02:08:58PM -0700, K. Y. Srinivasan wrote:
> > > > The channel state should be correctly set before registering the device. In
> the
> > > current
> > > > code the driver probe would fail for channels that have been rescinded and
> > > subsequently
> > > > re-offered. Fix the bug.
> > > >
> > > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > > Cc: <stable@vger.kernel.org>
> > >
> > > What older kernel versions have this bug?  When did it show up?
> >
> > The patch that introduced the bug is:
> >
> > commit e68d2971d26577b932a16333ce165af98a96e068
> > Author: K. Y. Srinivasan <kys@microsoft.com>
> > Date:   Thu May 23 12:02:32 2013 -0700
> >
> >     Drivers: hv: vmbus: Implement multi-channel support
> >
> > I think 3.10 shipped with this bug.
> 
> Why do you think that, it's not what git shows:
> 	$ git describe --contains e68d2971d26577b932a16333ce165af98a96e068
> 	v3.11-rc1~157^2~64
> 
> So this is a 3.11-only thing, right?

My mistake; I was looking at some version of linux-3.10 code that had this problem and so I assumed it must have shipped
in 3.10.

Regards,

K. Y
> 
> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2013-08-26 23:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 21:08 [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in the handling of channel offers K. Y. Srinivasan
2013-08-26 21:56 ` Greg KH
2013-08-26 22:48   ` KY Srinivasan
2013-08-26 23:13     ` Greg KH
2013-08-26 23:21       ` KY Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox