From: Greg KH <greg@kroah.com>
To: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Cc: Paul Mundt <lethal@linux-sh.org>,
linux-sh <linux-sh@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] SH/Dreamcast - fix regressions, whitespace and memory
Date: Mon, 04 Feb 2008 16:14:37 +0000 [thread overview]
Message-ID: <20080204161437.GA20739@kroah.com> (raw)
In-Reply-To: <1202113675.6489.6.camel@localhost.localdomain>
On Mon, Feb 04, 2008 at 08:27:55AM +0000, Adrian McMenamin wrote:
>
> On Sun, 2008-02-03 at 21:29 -0800, Greg KH wrote:
> > On Sun, Feb 03, 2008 at 08:00:47PM +0000, Adrian McMenamin wrote:
> > > From: Adrian McMenamin
> > >
> > > This patch fixes the regression noted here:
> > > http://lkml.org/lkml/2008/1/26/189 as well as whitespace issues in the
> > > previous commit of this driver and the memory leaks noted here:
> > > http://lkml.org/lkml/2008/2/2/143 (as well as one or two other minor
> > > cleanups).
> >
> > Which portion of the patch fixes the kobject WARN_ON()?
>
>
>
> + if (mdev->registered = 0) {
> + retval = device_register(&mdev->dev);
> + if (retval) {
> + printk(KERN_INFO
> + "Maple bus: Attempt to register device"
> + " (%x, %x) failed.\n",
> + mdev->port, mdev->unit);
> + maple_free_dev(mdev);
> + mdev = NULL;
> + return;
> + }
> + mdev->registered = 1;
> + }
> }
>
>
> Specifically the check on mdev->registered
So the code path could cause devices to be registered more than once?
That seems broken, as no other bus that I know of needs such a check :(
Is there a way to fix the root problem here, instead of this type of
change?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Cc: Paul Mundt <lethal@linux-sh.org>,
linux-sh <linux-sh@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver
Date: Mon, 4 Feb 2008 08:14:37 -0800 [thread overview]
Message-ID: <20080204161437.GA20739@kroah.com> (raw)
In-Reply-To: <1202113675.6489.6.camel@localhost.localdomain>
On Mon, Feb 04, 2008 at 08:27:55AM +0000, Adrian McMenamin wrote:
>
> On Sun, 2008-02-03 at 21:29 -0800, Greg KH wrote:
> > On Sun, Feb 03, 2008 at 08:00:47PM +0000, Adrian McMenamin wrote:
> > > From: Adrian McMenamin
> > >
> > > This patch fixes the regression noted here:
> > > http://lkml.org/lkml/2008/1/26/189 as well as whitespace issues in the
> > > previous commit of this driver and the memory leaks noted here:
> > > http://lkml.org/lkml/2008/2/2/143 (as well as one or two other minor
> > > cleanups).
> >
> > Which portion of the patch fixes the kobject WARN_ON()?
>
>
>
> + if (mdev->registered == 0) {
> + retval = device_register(&mdev->dev);
> + if (retval) {
> + printk(KERN_INFO
> + "Maple bus: Attempt to register device"
> + " (%x, %x) failed.\n",
> + mdev->port, mdev->unit);
> + maple_free_dev(mdev);
> + mdev = NULL;
> + return;
> + }
> + mdev->registered = 1;
> + }
> }
>
>
> Specifically the check on mdev->registered
So the code path could cause devices to be registered more than once?
That seems broken, as no other bus that I know of needs such a check :(
Is there a way to fix the root problem here, instead of this type of
change?
thanks,
greg k-h
next prev parent reply other threads:[~2008-02-04 16:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 20:00 [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Adrian McMenamin
2008-02-03 20:00 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 1:10 ` Paul Mundt
2008-02-04 1:10 ` Paul Mundt
2008-02-04 8:23 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Adrian McMenamin
2008-02-04 8:23 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 9:02 ` Paul Mundt
2008-02-04 9:02 ` Paul Mundt
2008-02-04 9:35 ` [PATCH] SH/Dreamcast - fix regressions, Adrian McMenamin
2008-02-04 9:35 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 9:59 ` Paul Mundt
2008-02-04 9:59 ` Paul Mundt
2008-02-04 10:18 ` [PATCH] SH/Dreamcast - fix regressions, Adrian McMenamin
2008-02-04 10:18 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 5:29 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Greg KH
2008-02-04 5:29 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Greg KH
2008-02-04 8:27 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Adrian McMenamin
2008-02-04 8:27 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 16:14 ` Greg KH [this message]
2008-02-04 16:14 ` Greg KH
2008-02-04 22:37 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Adrian McMenamin
2008-02-04 22:37 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-04 23:09 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Adrian McMenamin
2008-02-04 23:09 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Adrian McMenamin
2008-02-05 4:57 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory Greg KH
2008-02-05 4:57 ` [PATCH] SH/Dreamcast - fix regressions, whitespace and memory leaks in Maple Bus driver Greg KH
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=20080204161437.GA20739@kroah.com \
--to=greg@kroah.com \
--cc=adrian@newgolddream.dyndns.info \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.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 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.