stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	stable <stable@vger.kernel.org>,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH v2] parport: register driver later
Date: Tue, 5 Apr 2016 12:54:58 +0100	[thread overview]
Message-ID: <20160405115401.GA17246@sudip-tp> (raw)
In-Reply-To: <CA+55aFz0A07bbfSiCuBo4PPnEje1--zPSLuNzYrxqhj0gZFaWA@mail.gmail.com>

On Mon, Apr 04, 2016 at 11:13:12PM -0700, Linus Torvalds wrote:
> On Mar 6, 2016 7:10 AM, "Sudip Mukherjee" <sudipm.mukherjee@gmail.com>
> wrote:
> 
> >
> > Hi Ross,
> > Can you please test this patch in your setup. This is a respin of the
> > previous patch in another way.
> 
> This seems to have the exact same problem as the previous solution: it
> avoids the oops by simply failing the parport registration.
> 
> Yes, that gets rid of the oops, but it also means the driver that tries to
> register with the parport subsystem doesn't actually get registered.
> 
> What am I missing? Why would that
> 
>    return -EAGAIN;
> 
> be OK, when it historically just worked?

Hi Linus,
It really is an honour that you have taken time to reply to my mail.

It historically used to work because it never used the device model. In
device model we will get a stackdump if some device tries to register
with a bus when the bus itself is not yet registered.

If pardev tried to register with parallel port before parallel port
has actually registered then parport code used to call
get_lowlevel_driver() and even after that if portlist was empty then
pardev used to get NULL when it tried parport_find_number() and it
used to print a warning about "no associated port" and exit. There was
no stackdump.

This fix is actually not ok. This is a temporary fix and the actual fix
should be to implement deffered probe. And I have mentioned that in
https://lkml.org/lkml/2016/3/4/306
"We should actually have some deferred probe here. But considering that
you will be closing your trees soon so a quick fix to solve the problem
for now. We will revisit this when we remove the old api (hopefully v4.7)."


regards
sudip

      parent reply	other threads:[~2016-04-05 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 15:10 [PATCH v2] parport: register driver later Sudip Mukherjee
2016-03-07 17:32 ` Ross Zwisler
2016-04-05  5:26   ` Sudip Mukherjee
2016-04-05 12:58     ` Greg KH
2016-04-05 13:17       ` Sudip Mukherjee
2016-04-05 13:42         ` Greg KH
2016-04-05 13:44       ` Linus Torvalds
2016-04-05 13:47         ` Greg KH
2016-04-05 14:07           ` Linus Torvalds
     [not found] ` <CA+55aFz0A07bbfSiCuBo4PPnEje1--zPSLuNzYrxqhj0gZFaWA@mail.gmail.com>
2016-04-05 11:54   ` Sudip Mukherjee [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=20160405115401.GA17246@sudip-tp \
    --to=sudipm.mukherjee@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).