public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: Luca Olivetti <luca@ventoso.org>
Cc: Ingo Molnar <mingo@elte.hu>, Greg KH <gregkh@suse.de>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
	Janne Grunau <janne-dvb@grunau.be>
Subject: Re: [crash] af9005_usb_module_init(): BUG: unable to handle kernel paging request at ff100000
Date: Wed, 04 Feb 2009 08:12:18 -0800	[thread overview]
Message-ID: <1233763938.15119.92.camel@desktop> (raw)
In-Reply-To: <4989B913.1020702@ventoso.org>

On Wed, 2009-02-04 at 16:49 +0100, Luca Olivetti wrote:
> 
> No, I havent: the source file isn't compiled, so those symbols are 
> unavailable to the linker.
> The only reference I could find (well, I haven't searched that much) on 
> the expected behaviour of the linker when a weak attribute is not found 
> is this:
> 
> http://software.intel.com/en-us/articles/software-convention-models-using-elf-visibility-attributes/
> 
> "# STB_WEAK. A weak symbol behaves as does a global symbol, with a few 
> differences. If there are both a weak and a global definition of a name, 
> the global definition takes precedence and any weak definitions are 
> ignored. The Linker will not extract archive members to resolve 
> undefined weak symbols. It is not an error to have unresolved weak 
> references; unresolved weak symbols have the value zero. "

I wrote a little test to see if this was true in gcc, and it does appear
to give a NULL in a simple case. However, after reviewing Ingo's
disassmbled function it look like the crash is happening on this line,

/* module stuff */
static int __init af9005_usb_module_init(void)
{
        int result;
        if ((result = usb_register(&af9005_usb_driver))) {
                err("usb_register failed. (%d)", result);
                return result;
        }
        rc_decode = symbol_request(af9005_rc_decode);
        rc_keys = symbol_request(af9005_rc_keys);
        rc_keys_size = symbol_request(af9005_rc_keys_size);
        if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) {
                err("af9005_rc_decode function not found, disabling remote");
                af9005_properties.rc_query = NULL;
        } else {
                af9005_properties.rc_key_map = rc_keys;
                af9005_properties.rc_key_map_size = *rc_keys_size; /* <= crash !!! */
        }

        return 0;
}

That line should never run if everything is NULL ..

Daniel


  reply	other threads:[~2009-02-04 16:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 17:28 [crash] af9005_usb_module_init(): BUG: unable to handle kernel paging request at ff100000 Ingo Molnar
2009-02-03 17:45 ` Arjan van de Ven
2009-02-03 18:22 ` Daniel Walker
2009-02-03 19:30   ` Ingo Molnar
2009-02-03 20:41     ` Luca Olivetti
2009-02-03 21:18       ` Luca Olivetti
2009-02-03 21:32       ` Ingo Molnar
2009-02-04  1:14       ` Daniel Walker
2009-02-04 14:52         ` Luca Olivetti
2009-02-04 15:16           ` Daniel Walker
2009-02-04 15:49             ` Luca Olivetti
2009-02-04 16:12               ` Daniel Walker [this message]
2009-02-04 18:12                 ` Luca Olivetti
2009-02-04 18:30 ` Daniel Walker
2009-02-04 18:41   ` Luca Olivetti
2009-02-04 19:27     ` Daniel Walker

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=1233763938.15119.92.camel@desktop \
    --to=dwalker@fifo99.com \
    --cc=gregkh@suse.de \
    --cc=hverkuil@xs4all.nl \
    --cc=janne-dvb@grunau.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca@ventoso.org \
    --cc=mchehab@infradead.org \
    --cc=mingo@elte.hu \
    /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