linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Boutcher <boutcher@us.ibm.com>,
	Ryan Arnold <ryanarn@us.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Colin Devilbiss <devilbis@us.ibm.com>
Subject: Re: [PATCH] viotape: Fix memory and semaphore leak
Date: Thu, 13 Aug 2009 15:18:07 +0200	[thread overview]
Message-ID: <200908131518.07707.mb@bu3sch.de> (raw)
In-Reply-To: <1250139603.3587.106.camel@pasglop>

On Thursday 13 August 2009 07:00:03 Benjamin Herrenschmidt wrote:
> On Sat, 2009-07-18 at 15:06 +0200, Michael Buesch wrote:
> > This patch fixes a memory and semaphore leak in the viotape driver's
> > char device write op. It leaks the DMA memory and the semaphore lock
> > in case the device was opened with O_NONBLOCK.
> > 
> > This patch is only compile tested, because I do not have the hardware.
> > 
> > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> 
> (going trough my backlog ...)
> 
> Thanks Michael, but I don't think that's right...
> 
> IE. We aren't waiting for the write to complete, which means that it can
> be happening asynchronously, thus we must not free the DMA memory until
> it has actually complete.
> 
> Now, if you look at vioHandleTapeEvent(), it does appear that when the
> completion happens, the DMA memory will eventually be released and the
> mutex up'ed. 
> 
> Or am I missing something ?

I think you are right.


-- 
Greetings, Michael.

      reply	other threads:[~2009-08-13 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 13:06 [PATCH] viotape: Fix memory and semaphore leak Michael Buesch
2009-08-13  5:00 ` Benjamin Herrenschmidt
2009-08-13 13:18   ` Michael Buesch [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=200908131518.07707.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=benh@kernel.crashing.org \
    --cc=boutcher@us.ibm.com \
    --cc=devilbis@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ryanarn@us.ibm.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;
as well as URLs for NNTP newsgroup(s).