History

Drivers: hv: hv_fcopy: fix a race condition for SMP guest

We should schedule the 5s "timer work" before starting the data transfer, otherwise, the data transfer code may finish so fast on another virtual cpu that when the code(fcopy_write()) trying to cancel the 5s "timer work" can occasionally fail because the "timer work" may haven't been scheduled yet and as a result the fcopy process will be aborted wrongly by fcopy_work_func() in 5s. Thank Liz Zhang <lizzha@microsoft.com> for the initial investigation on the bug. This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1118123

Dexuan Cui committed 12 years ago

Commit 2ef82d21 parent 1795cd91 file · +1 −1Browse files

Unified · Split

drivers/hv/hv_fcopy.c+1−1
@@ -246,8 +246,8 @@ void hv_fcopy_onchannelcallback(void *context) · 245 unmodified lines
246246 /*
247247 * Send the information to the user-level daemon.
248248 */
249− fcopy_send_data();
250249 schedule_delayed_work(&fcopy_work, 5*HZ);
250+ fcopy_send_data();
251251 return;
252252 }
253253 icmsghdr->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t