Re: Unloading a module with a function which is used by a static call

From: Peter Zijlstra
Date: Fri Sep 17 2021 - 16:11:37 EST


On Fri, Sep 17, 2021 at 11:07:22PM +0300, Denis Efremov wrote:
> Hi,
>
> I'm not sure, but is it intentional that we don't increase a module refcounter
> when we call static_call_update()? Let's imagine that:

For all intents and purposes, static_call_update() is the same as
assinging a function pointer. That also doesn't increment module counts.

If your case requires management of module refcounts, you get to do so.