From: Pete Zaitcev <zaitcev@redhat.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] 32 Memory Leaks on Error Paths
Date: Mon, 29 Sep 2003 13:54:46 -0400 [thread overview]
Message-ID: <20030929135446.F539@devserv.devel.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0309271332080.2874-100000@localhost.localdomain>; from marcelo.tosatti@cyclades.com on Mon, Sep 29, 2003 at 02:48:33PM -0300
> Date: Mon, 29 Sep 2003 14:48:33 -0300 (BRT)
> From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
> > > Date: Tue, 23 Sep 2003 13:15:15 -0700
> > > From: Chris Wright <chrisw@osdl.org>
> >
> > > --- 1.38/sound/oss/ymfpci.c Tue Aug 26 09:25:41 2003
> > > +++ edited/sound/oss/ymfpci.c Tue Sep 23 12:42:45 2003
> > > @@ -2638,6 +2638,7 @@
> > > out_free:
> > > if (codec->ac97_codec[0])
> > > ac97_release_codec(codec->ac97_codec[0]);
> > > + kfree(codec);
> > > return -ENODEV;
> >
> > Someone was savaging sound code, adding these bugs.
> > For 2.6, the above patch is probably ok; it's immaterial,
> > because ALSA won long ago.
> >
> > A patch for 2.4 to undo the damage is attached.
>
> So let me see if I get it right: The above "+ kfree(codec)" addition caused the bug?
No, bugs were added for 2.4.22 (a diff between 2.4.21 & .22
removes kfree's). Chris adds some kfrees back, but not all.
Also, 2.4.22 adds spinlocks around schedule(). My bigger patch
replaces them with semaphores, because interrupts are never
involved and they were done from a process context only.
However, Alan noted that ac97 operations can be called with
interrupts closed, and so the right approach is to retain
spinlocks, but replace schedule() with mdelay(). This is gonna
be one huge sleep under cli... Nonetheless, I'll send a better
patch soonish.
-- Pete
next prev parent reply other threads:[~2003-09-29 18:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030923140503.N20572@osdlab.pdx.osdl.net>
2003-09-24 4:13 ` [CHECKER] 32 Memory Leaks on Error Paths Pete Zaitcev
2003-09-24 12:49 ` Alan Cox
2003-09-24 16:38 ` Pete Zaitcev
2003-09-29 17:48 ` Marcelo Tosatti
2003-09-29 17:54 ` Pete Zaitcev [this message]
2003-11-06 0:58 ` Pete Zaitcev
2003-09-16 4:35 David Yu Chen
2003-09-16 6:40 ` Neil Brown
2003-09-16 6:55 ` Jörn Engel
2003-09-16 7:32 ` Jörn Engel
2003-09-16 8:51 ` Jörn Engel
2003-09-16 14:52 ` Timothy Miller
2003-09-16 15:02 ` Wade
2003-09-16 15:04 ` Valdis.Kletnieks
2003-09-16 15:04 ` Nick Piggin
2003-09-16 8:45 ` Wade
2003-09-16 8:56 ` Jörn Engel
2003-09-16 12:10 ` Andries Brouwer
2003-09-16 9:07 ` Jörn Engel
2003-09-20 7:58 ` David S. Miller
2003-09-16 12:03 ` Andries Brouwer
2003-09-19 23:03 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-23 13:15 ` Stephen Smalley
2003-09-23 18:02 ` Chris Wright
2003-09-22 22:54 ` Chris Wright
2003-09-22 22:55 ` Chris Wright
2003-09-22 22:55 ` Chris Wright
2003-09-23 20:13 ` Chris Wright
2003-09-23 20:25 ` Greg KH
2003-09-23 21:38 ` Chris Wright
2003-09-23 22:14 ` Chris Wright
2003-09-24 0:17 ` Greg KH
2003-09-23 20:14 ` Chris Wright
2003-09-24 7:08 ` David Howells
2003-09-23 20:14 ` Chris Wright
2003-09-23 20:21 ` Jean Tourrilhes
2003-09-23 20:24 ` Chris Wright
2003-09-23 20:14 ` Chris Wright
2003-09-23 20:15 ` Chris Wright
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=20030929135446.F539@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox