lkml.org 
[lkml]   [2008]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] firewire: fix panic in handle_at_packet
Date
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


\
 
 \ /
  Last update: 2008-03-17 04:37    [W:0.052 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site