module refcount issues in the liquidio driver

From: Christoph Hellwig
Date: Thu Mar 11 2021 - 02:39:11 EST


Hi all,

I just stumbled over the odd handling of module refcounts in the liquidio
driver. The big red flag is the call to module_refcount in
liquidio_watchdog, which will do the wrong thing for any external module
refcount, like a userspace open.

But more importantly the whole concept of acquiring module refcounts from
inside the driver is pretty bogus. What problem does this try to solve?