All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexander Holler <holler@ahsoftware.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Bernie Thompson <bernie@plugable.com>,
	Steve Glendinning <steve.glendinning@shawell.net>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect
Date: Tue, 5 Feb 2013 09:22:45 -0800	[thread overview]
Message-ID: <20130205172245.GA1426@kroah.com> (raw)
In-Reply-To: <5110AFEC.8020406@ahsoftware.de>

On Tue, Feb 05, 2013 at 08:08:28AM +0100, Alexander Holler wrote:
> Am 04.02.2013 20:25, schrieb Greg KH:
> > On Mon, Feb 04, 2013 at 08:17:04PM +0100, Alexander Holler wrote:
> >> Am 04.02.2013 13:05, schrieb Alexander Holler:
> >>> Am 04.02.2013 02:14, schrieb Greg KH:
> >>>
> >>>> So you are right in that your driver will wait for forever for a
> >>>> disconnect() to happen, as it will never be called.  I don't understand
> >>>> the problem that this is causing when it happens.  What's wrong with
> >>>> udlfb that having the cpu suddently reset as the powerdown happened
> >>>> without it knowing about it?
> >>>
> >>> There is nothing wrong with that. I've just explained why a problem
> >>> doesn't occur on shutdown but on disconnect (of the device).
> >>
> >> Maybe my explanation before was just to long and I try to explain it
> >> a bit shorter:
> >>
> >> If a device gets disconnected, the disconnect in udlfb might wait
> >> forever in down_interruptible() (because it waits for an urb it
> >> never receives). This even prevents a shutdown afterwards, because
> >> that down_interruptible() never receives a signal (at shutdown,
> >> because kernel threads don't get such).
> > 
> > Where was that urb when the disconnect happened?  The USB core should
> > call your urb callback for any outstanding urbs at that point in time,
> > with the proper error flag being set, are you handling that properly?
> 
> I don't know where that urb is as I don't handle it.

What do you mean by that?  The urb is being sent back to your driver,
right?  If not, that's a bug, but please be sure that your urb callback
isn't really being called.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexander Holler <holler@ahsoftware.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Bernie Thompson <bernie@plugable.com>,
	Steve Glendinning <steve.glendinning@shawell.net>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect
Date: Tue, 05 Feb 2013 17:22:45 +0000	[thread overview]
Message-ID: <20130205172245.GA1426@kroah.com> (raw)
In-Reply-To: <5110AFEC.8020406@ahsoftware.de>

On Tue, Feb 05, 2013 at 08:08:28AM +0100, Alexander Holler wrote:
> Am 04.02.2013 20:25, schrieb Greg KH:
> > On Mon, Feb 04, 2013 at 08:17:04PM +0100, Alexander Holler wrote:
> >> Am 04.02.2013 13:05, schrieb Alexander Holler:
> >>> Am 04.02.2013 02:14, schrieb Greg KH:
> >>>
> >>>> So you are right in that your driver will wait for forever for a
> >>>> disconnect() to happen, as it will never be called.  I don't understand
> >>>> the problem that this is causing when it happens.  What's wrong with
> >>>> udlfb that having the cpu suddently reset as the powerdown happened
> >>>> without it knowing about it?
> >>>
> >>> There is nothing wrong with that. I've just explained why a problem
> >>> doesn't occur on shutdown but on disconnect (of the device).
> >>
> >> Maybe my explanation before was just to long and I try to explain it
> >> a bit shorter:
> >>
> >> If a device gets disconnected, the disconnect in udlfb might wait
> >> forever in down_interruptible() (because it waits for an urb it
> >> never receives). This even prevents a shutdown afterwards, because
> >> that down_interruptible() never receives a signal (at shutdown,
> >> because kernel threads don't get such).
> > 
> > Where was that urb when the disconnect happened?  The USB core should
> > call your urb callback for any outstanding urbs at that point in time,
> > with the proper error flag being set, are you handling that properly?
> 
> I don't know where that urb is as I don't handle it.

What do you mean by that?  The urb is being sent back to your driver,
right?  If not, that's a bug, but please be sure that your urb callback
isn't really being called.

thanks,

greg k-h

  reply	other threads:[~2013-02-05 17:20 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 13:20 [PATCH] fb: udlfb: fix hang at disconnect Alexander Holler
2013-01-12 13:20 ` Alexander Holler
2013-01-12 22:22 ` Bernie Thompson
2013-01-12 22:22   ` Bernie Thompson
2013-01-13 12:05   ` Alexander Holler
2013-01-13 12:05     ` Alexander Holler
2013-01-13 12:24     ` Alexander Holler
2013-01-13 12:24       ` Alexander Holler
2013-01-25 18:49     ` [PATCH 1/3] semaphore: introduce down_timeout_killable() Alexander Holler
2013-01-25 18:49       ` Alexander Holler
2013-01-25 18:49       ` [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect Alexander Holler
2013-01-25 18:49         ` Alexander Holler
2013-01-29  0:22         ` Andrew Morton
2013-01-29  0:22           ` Andrew Morton
2013-01-29  0:56           ` Alexander Holler
2013-01-29  0:56             ` Alexander Holler
2013-01-29 10:35             ` Alexander Holler
2013-01-29 10:35               ` Alexander Holler
2013-01-29 11:11               ` Alexander Holler
2013-01-29 11:11                 ` Alexander Holler
2013-01-29 15:51                 ` Alexander Holler
2013-01-29 15:51                   ` Alexander Holler
2013-01-29 20:35                   ` Alexander Holler
2013-01-29 20:35                     ` Alexander Holler
2013-01-29 20:56                     ` Alexander Holler
2013-01-29 20:56                       ` Alexander Holler
2013-02-04  1:14                     ` Greg KH
2013-02-04  1:14                       ` Greg KH
2013-02-04 12:05                       ` Alexander Holler
2013-02-04 12:05                         ` Alexander Holler
2013-02-04 19:17                         ` Alexander Holler
2013-02-04 19:17                           ` Alexander Holler
2013-02-04 19:25                           ` Greg KH
2013-02-04 19:25                             ` Greg KH
2013-02-05  7:08                             ` Alexander Holler
2013-02-05  7:08                               ` Alexander Holler
2013-02-05 17:22                               ` Greg KH [this message]
2013-02-05 17:22                                 ` Greg KH
2013-02-05 17:36                                 ` Alexander Holler
2013-02-05 17:36                                   ` Alexander Holler
2013-02-08  4:07                                   ` Dave Airlie
2013-02-08  4:07                                     ` Dave Airlie
2013-02-08  9:53                                     ` Alexander Holler
2013-02-08  9:53                                       ` Alexander Holler
2013-01-25 18:49       ` [PATCH 3/3] fb: smscufx: " Alexander Holler
2013-01-25 18:49         ` Alexander Holler

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=20130205172245.GA1426@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=FlorianSchandinat@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=bernie@plugable.com \
    --cc=holler@ahsoftware.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steve.glendinning@shawell.net \
    /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.