* [PATCH] firewire: sbp2: fix freeing of unallocated memory
@ 2009-09-03 21:07 Stefan Richter
0 siblings, 0 replies; only message in thread
From: Stefan Richter @ 2009-09-03 21:07 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-03 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 21:07 [PATCH] firewire: sbp2: fix freeing of unallocated memory Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®