Re: [PATCH v2 0/4] Static calls

From: Edward Cree
Date: Fri Dec 07 2018 - 11:50:17 EST


On 07/12/18 16:06, Edward Cree wrote:
> Sorry if this has been pointed out before (it's a very long thread), but
> in the out-of-line implementation, it appears that static_call_update()
> never alters key->func. Am I right in thinking that this should be
> fixed by adding 'WRITE_ONCE(key->func, func);' just after the call to
> arch_static_call_transform() on line 159 of include/linux/static_call.h?
On further examination, it's worse than that.

Why does the CONFIG_HAVE_STATIC_CALL_OUTLINE static_call_update() not
Âcall __static_call_update()? It contains nothing but a BUILD_BUG_ON,
Âwhich isn't likely to update anything.

-Ed