Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
RH6 : hv_netvsc: Fix the order of num_sc_offered decrement
Browse files Browse the repository at this point in the history
  • Loading branch information
vyadavmsft committed Apr 17, 2016
1 parent cc44001 commit d68f69e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hv-rhel6.x/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,12 +997,6 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc)

nvscdev = hv_get_drvdata(new_sc->primary_channel->device_obj);

spin_lock_irqsave(&nvscdev->sc_lock, flags);
nvscdev->num_sc_offered--;
spin_unlock_irqrestore(&nvscdev->sc_lock, flags);
if (nvscdev->num_sc_offered == 0)
complete(&nvscdev->channel_init_wait);

if (chn_index >= nvscdev->num_chn)
return;

Expand All @@ -1015,6 +1009,14 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc)

if (ret == 0)
nvscdev->chn_table[chn_index] = new_sc;
spin_lock_irqsave(&nvscdev->sc_lock, flags);
nvscdev->num_sc_offered--;
spin_unlock_irqrestore(&nvscdev->sc_lock, flags);
if (nvscdev->num_sc_offered == 0)
complete(&nvscdev->channel_init_wait);



}

int rndis_filter_device_add(struct hv_device *dev,
Expand Down

0 comments on commit d68f69e

Please sign in to comment.