Thread (14 messages) 14 messages, 3 authors, 2023-09-14

Re: [PATCH] module: print module name on refcount error

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2023-07-07 18:56:59
Also in: lkml

On Mon, Jul 03, 2023 at 03:47:22PM +0200, Michal Hocko wrote:
On Fri 30-06-23 16:05:33, Luis Chamberlain wrote:
[...]
quoted
What prevents code from racing the free with a random module_put()
called by some other piece of code?
Wouldn't be ref count a garbage already? How can you race when freeing
if module_put fail?
It could yes, ie, so this risks at all being junk. So best IMHO is
to tidy up all the get / puts and add respective tests to fix all
this mess with proper messages as needed. My cursory review of the
refcnt stuf is I see some races possible.

While I'd be happy to help debugging aids, adding accesses to random
memory for a string seems more risk prone.

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help