login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
May
»
27
Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modified)
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jiri Slaby
Subject:
Re: [PATCH 1/1] staging: hv: Fix race condition on IC channel initialization (modified)
Date: Wednesday, May 26, 2010 - 11:16 pm
On 05/26/2010 11:25 PM, Haiyang Zhang wrote:
quoted text
>> From: Greg KH [mailto:gregkh@suse.de] >>> + VmbusChannelOpen(newChannel, 2 * PAGE_SIZE, >>> + 2 * PAGE_SIZE, NULL, 0, >>> + hv_cb_utils[cnt].callback, >>> + newChannel) == 0) { >>> + hv_cb_utils[cnt].channel = newChannel; >>> + mb(); >> >> What is the mb() call for? Why is it necessary? (hint, if you need it, >> something else is really wrong...) > > It ensures the channel assignment happens before the wakeup call: > osd_WaitEventSet(ic_channel_ready), if the compiler optimization re-arrange > the execution order.
wake_up() is a barrier, you don't need the mb() there. BTW osd_WaitEventSet et al. can be easily converted to completion. -- js --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/1] staging: hv: Fix race condition on IC channel ...
, Haiyang Zhang
, (Wed May 26, 9:54 am)
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Greg KH
, (Wed May 26, 1:51 pm)
RE: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Haiyang Zhang
, (Wed May 26, 2:25 pm)
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Greg KH
, (Wed May 26, 2:48 pm)
RE: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Hank Janssen
, (Wed May 26, 3:03 pm)
RE: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Haiyang Zhang
, (Wed May 26, 3:23 pm)
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Greg KH
, (Wed May 26, 3:30 pm)
RE: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Haiyang Zhang
, (Wed May 26, 3:52 pm)
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Jiri Slaby
, (Wed May 26, 11:16 pm)
Re: [PATCH 1/1] staging: hv: Fix race condition on IC chan ...
, Greg KH
, (Thu May 27, 4:22 pm)
Navigation
Mailing list archives
Recent posts