DCCP protocol discussions
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dccp@vger.kernel.org
Subject: Re: [PATCH] dccp_probe: Fix module load dependencies between dccp
Date: Fri, 15 Jan 2010 09:41:10 +0000	[thread overview]
Message-ID: <20100115.014110.33561920.davem@davemloft.net> (raw)
In-Reply-To: <20100114201517.GA32352@hmsreliant.think-freely.org>

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Date: Thu, 14 Jan 2010 18:17:43 -0200

> Em Thu, Jan 14, 2010 at 03:15:17PM -0500, Neil Horman escreveu:
>> Hey-
>> 	This was just recently reported to me.  When built as modules,
>> the dccp_probe module has a silent dependency on the dccp module.  This stems
>> from the fact that the module_init routine of dccp_probe registers a jprobe on
>> the dccp_sendmsg symbol.  Since the symbol is only referenced as a text string
>> (the .symbol_name field in the jprobe struct) rather than the address of the
>> symbol itself, depmod never picks this dependency up, and so if you load the
>> dccp_probe module without the dccp module loaded, the register_jprobe call fails
>> with an -EINVAL, and the whole module load fails.
>> 
>> 	The fix is pretty easy, we can just wrap the register_jprobe call in a
>> try_then_request_module call, which forces the dependency to get satisfied prior
>> to the probe registration.
>> 
>> 	I've verified that this fixes the problem myself.
>> 
>> Regards
>> Neil
>> 
>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> 
> That is ok with me, thanks!
> 
> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Applied.

Neil, always CC: netdev on networking patches, thanks.

  parent reply	other threads:[~2010-01-15  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14 20:15 [PATCH] dccp_probe: Fix module load dependencies between dccp and Neil Horman
2010-01-14 20:17 ` [PATCH] dccp_probe: Fix module load dependencies between dccp Arnaldo Carvalho de Melo
2010-01-15  9:41 ` David Miller [this message]
2010-01-15 11:43 ` Neil Horman
2010-01-20  7:07 ` gerrit

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20100115.014110.33561920.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dccp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox