public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jwilson@redhat.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH] firewire: fix panic in handle_at_packet
Date: Sun, 16 Mar 2008 23:32:02 -0400	[thread overview]
Message-ID: <200803162332.02407.jwilson@redhat.com> (raw)
In-Reply-To: <tkrat.098225020c179827@s5r6.in-berlin.de>

On Saturday 15 March 2008 07:56:41 pm Stefan Richter wrote:
> This fixes a use-after-free bug in the handling of split transactions.
> The AT DMA handler of the request was occasionally executed after the
> AR DMA handler of the response.  The AT DMA handler then accessed an
> already freed packet.
>
> Reported by Johannes Berg <johannes@sipsolutions.net>.
> http://bugzilla.kernel.org/show_bug.cgi?id=9617
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

Panics hooking up to an x86 mac mini in target disk mode are gone on my end 
with this patch added, and the fix makes sense -- assuming I've got it right, 
in my head, of course. ;)

As I understand it, we'll now simply bail in handle_at_packet when we see 
packet == NULL, rather than trying to play with already freed memory, and 
cancelling an AT packet here should always be perfectly safe, because we're 
already onto the AR side of this transaction, and in most cases, the AT 
handler already fired anyway.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>

-- 
Jarod Wilson
jwilson@redhat.com

  reply	other threads:[~2008-03-17  3:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15 23:56 [PATCH] firewire: fix panic in handle_at_packet Stefan Richter
2008-03-17  3:32 ` Jarod Wilson [this message]
2008-03-19 23:24   ` Stefan Richter

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=200803162332.02407.jwilson@redhat.com \
    --to=jwilson@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /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