LKML Archive on
help / color / mirror / Atom feed
From: Paulo Marques <>
To: Alexey Dobriyan <>
Subject: Re: [PATCH v3] Race between cat /proc/kallsyms and rmmod
Date: Mon, 19 Mar 2007 15:20:43 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Alexey Dobriyan wrote:
> Iterating code of /proc/kallsyms calls module_get_kallsym() which grabs
> and drops module_mutex internally and returns "struct module *",
> module is removed, aforementioned "struct module *" is used in non-trivial
> way.
> Steps to reproduce:
> 	modprobe/rmmod loop
> 	cat /proc/kallsyms >/dev/null loop
> Copy all needed info under module_mutex.
> NOTE: this patch keeps module_mutex static.

Yes, this patch fixes the "cat /proc/kallsyms" race without changing any 
"external" interfaces, so I think it should go into mainline in any case.

Acked-by: Paulo Marques <>

Paulo Marques -

"All I ask is a chance to prove that money can't make me happy."

  reply	other threads:[~2007-03-19 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 11:42 [PATCH RESEND 1/2] " Alexey Dobriyan
2007-03-19 14:33 ` [PATCH v3] " Alexey Dobriyan
2007-03-19 15:20   ` Paulo Marques [this message]
2007-03-19 23:35   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v3] Race between cat /proc/kallsyms and rmmod' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).