public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Holger Macht <holger@homac.de>
To: Hugh Dickins <hughd@google.com>
Cc: Matthew Garrett <mjg@redhat.com>,
	Jeff Garzik <jgarzik@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: linux-next: dock_link_device is oopsy
Date: Fri, 17 Feb 2012 23:29:22 +0100	[thread overview]
Message-ID: <20120217222922.GA2741@homac.suse.de> (raw)
In-Reply-To: <alpine.LSU.2.00.1202171320590.5994@eggly.anvils>

On Fr 17. Feb - 13:46:04, Hugh Dickins wrote:
> Matthew,
> 
> A linux-next oops at bootup in dock_link_device() tells me that you
> were not feeling well when you wrote that and dock_unlink_device():
> I hope you're feeling better now and can rewrite them soon.

Andrew Morton experienced a similar problem. What system are you using?
I didn't encounter this problem with the systems I tested with.

Do you actually have a /sys/devices/platform/dock.?/ directory with a
file 'type' that contains 'dock_station'?

> I think my particular problem comes from dock_station_count 0,
> so kmalloc() returns NULL, which you don't check for.  But those
> functions appear to be minor masterpieces of doing things in the
> wrong order, not checking allocation, not freeing resource on failure.
> 
> I'm not attaching a proposed patch because, on that record, I bet when
> you look closer you'll find more wrong that I wouldn't know about.
> 
> Let's hope this isn't diverted into an endless discussion of whether
> you ought to use kaalloc() or kballoc() or ....  me, I'd just like to
> boot, and have put #if 0..#endif around everything in those functions.

Nevertheless, we should check for this error case or make sure we aren't
able to run into it.

Thanks,
 Holger

  reply	other threads:[~2012-02-17 22:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 21:46 linux-next: dock_link_device is oopsy Hugh Dickins
2012-02-17 22:29 ` Holger Macht [this message]
2012-02-17 22:42   ` Hugh Dickins
2012-02-17 23:01     ` Holger Macht
2012-02-17 23:49       ` Hugh Dickins
2012-02-18 11:14         ` Holger Macht
2012-02-18 13:05           ` Hillf Danton
2012-02-18 13:26             ` Holger Macht
2012-02-18 13:37               ` Hillf Danton
2012-02-18 14:04                 ` Holger Macht
2012-02-18 14:35                   ` Hillf Danton
2012-02-18 18:46                   ` Hugh Dickins
2012-02-18 19:57                     ` Holger Macht
2012-02-18 21:03                       ` Hugh Dickins
2012-02-18 21:50                         ` Holger Macht
2012-02-21 22:24                       ` Jeff Garzik
2012-02-21 22:30                         ` Holger Macht
2012-02-18  7:52       ` Hugh Dickins

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=20120217222922.GA2741@homac.suse.de \
    --to=holger@homac.de \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=jgarzik@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=sfr@canb.auug.org.au \
    /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