diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2013-08-26 17:08:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-28 00:49:26 -0400 |
commit | 42dceebe34600b2d02a38baa3e869009ba3d14c7 (patch) | |
tree | 0ae78b0a2c9c1c1f651ac1d11196e8e371c68b91 /drivers/hv | |
parent | ef22d576dd9d028dba53476bbcfc36aa1b5d768b (diff) |
Drivers: hv: vmbus: Fix a bug in the handling of channel offers
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 <stable@vger.kernel.org> # 3.11
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | 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 12ec8c801b25..bbff5f200bef 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) | |||
293 | } | 293 | } |
294 | 294 | ||
295 | /* | 295 | /* |
296 | * This state is used to indicate a successful open | ||
297 | * so that when we do close the channel normally, we | ||
298 | * can cleanup properly | ||
299 | */ | ||
300 | newchannel->state = CHANNEL_OPEN_STATE; | ||
301 | |||
302 | /* | ||
296 | * Start the process of binding this offer to the driver | 303 | * Start the process of binding this offer to the driver |
297 | * We need to set the DeviceObject field before calling | 304 | * We need to set the DeviceObject field before calling |
298 | * vmbus_child_dev_add() | 305 | * vmbus_child_dev_add() |
@@ -318,13 +325,6 @@ static void vmbus_process_offer(struct work_struct *work) | |||
318 | kfree(newchannel->device_obj); | 325 | kfree(newchannel->device_obj); |
319 | 326 | ||
320 | free_channel(newchannel); | 327 | free_channel(newchannel); |
321 | } else { | ||
322 | /* | ||
323 | * This state is used to indicate a successful open | ||
324 | * so that when we do close the channel normally, we | ||
325 | * can cleanup properly | ||
326 | */ | ||
327 | newchannel->state = CHANNEL_OPEN_STATE; | ||
328 | } | 328 | } |
329 | } | 329 | } |
330 | 330 | ||