lkml.org 
[lkml]   [2009]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] firewire: sbp2: fix freeing of unallocated memory
If a target writes invalid status (typically status of a command that
already timed out, firewire-sbp2 attempts to put away an ORB that
doesn't exist. https://bugzilla.redhat.com/show_bug.cgi?id=519772

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/sbp2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux/drivers/firewire/sbp2.c
===================================================================
--- linux.orig/drivers/firewire/sbp2.c
+++ linux/drivers/firewire/sbp2.c
@@ -456,12 +456,12 @@ static void sbp2_status_write(struct fw_
}
spin_unlock_irqrestore(&card->lock, flags);

- if (&orb->link != &lu->orb_list)
+ if (&orb->link != &lu->orb_list) {
orb->callback(orb, &status);
- else
+ kref_put(&orb->kref, free_orb);
+ } else {
fw_error("status write for unknown orb\n");
-
- kref_put(&orb->kref, free_orb);
+ }

fw_send_response(card, request, RCODE_COMPLETE);
}
--
Stefan Richter
-=====-==--= =--= ---==
http://arcgraph.de/sr/


\
 
 \ /
  Last update: 2009-09-03 23:11    [W:0.023 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site