All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: John Stultz <john.stultz@linaro.org>,
	Saravana Kannan <saravanak@google.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Todd Kjos <tkjos@google.com>,
	Amit Pundir <amit.pundir@linaro.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-serial@vger.kernel.org
Subject: Re: [RFC][PATCH] tty: serial: qcom_geni_serial: Drop __init from qcom_geni_console_setup
Date: Wed, 12 Aug 2020 11:11:58 +0200	[thread overview]
Message-ID: <74bc87df-db5a-4388-9b8d-4eed78196685@kernel.org> (raw)
In-Reply-To: <CALAqxLUhX0JLLvn=4fNXk0z6dm=teqCaBmz2VDPEKGfZ+EDFZw@mail.gmail.com>

On 11. 08. 20, 22:02, John Stultz wrote:
> On Tue, Aug 11, 2020 at 10:00 AM Saravana Kannan <saravanak@google.com> wrote:
>>
>> On Mon, Aug 10, 2020 at 7:50 PM John Stultz <john.stultz@linaro.org> wrote:
>>>
>>> When booting with heavily modularized config, the serial console
>>> may not be able to load until after init when modules that
>>> satisfy needed dependencies have time to load.
>>>
>>> Unfortunately, as qcom_geni_console_setup is marked as __init,
>>> the function may have been freed before we get to run it,
>>> causing boot time crashes such as:
>>
>> Btw, I thought non-__init functions calling __init functions would be
>> caught by the build system. Is that not correct? If it's correct, do
>> we know how this gets past that check?
> 
> I think it's because it's indirectly called through a function pointer.

Definitely.

Given there are lots of __init by *_console_setup, I wonder how many
console drivers return EPROBE_DEFER from probe and then register the
console from the same (but deferred) probe like this driver does...

In fact, it doesn't even matter if the probe returns EPROBE_DEFER. The
probe is not marked __init, so the setup shouldn't be either.

thanks,
-- 
js

      reply	other threads:[~2020-08-12  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  2:50 [RFC][PATCH] tty: serial: qcom_geni_serial: Drop __init from qcom_geni_console_setup John Stultz
2020-08-11  5:29 ` Bjorn Andersson
2020-08-11 16:59 ` Saravana Kannan
2020-08-11 20:02   ` John Stultz
2020-08-12  9:11     ` Jiri Slaby [this message]

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=74bc87df-db5a-4388-9b8d-4eed78196685@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=agross@kernel.org \
    --cc=amit.pundir@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=saravanak@google.com \
    --cc=tkjos@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.