diff options
| author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-09-03 17:07:35 -0400 |
|---|---|---|
| committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-09-05 09:59:34 -0400 |
| commit | baed6b82d9f160184c1c14cdb4accb08f3eb6b87 (patch) | |
| tree | eaeee0797d802462447d5aefbb09ddbdefa69986 | |
| parent | 4fe0badd5882c64dc2dcd8893f9b85db63339736 (diff) | |
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>
| -rw-r--r-- | drivers/firewire/sbp2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index d27cb058da82..05f0c0c55f4a 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
| @@ -456,12 +456,12 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, | |||
| 456 | } | 456 | } |
| 457 | spin_unlock_irqrestore(&card->lock, flags); | 457 | spin_unlock_irqrestore(&card->lock, flags); |
| 458 | 458 | ||
| 459 | if (&orb->link != &lu->orb_list) | 459 | if (&orb->link != &lu->orb_list) { |
| 460 | orb->callback(orb, &status); | 460 | orb->callback(orb, &status); |
| 461 | else | 461 | kref_put(&orb->kref, free_orb); |
| 462 | } else { | ||
| 462 | fw_error("status write for unknown orb\n"); | 463 | fw_error("status write for unknown orb\n"); |
| 463 | 464 | } | |
| 464 | kref_put(&orb->kref, free_orb); | ||
| 465 | 465 | ||
| 466 | fw_send_response(card, request, RCODE_COMPLETE); | 466 | fw_send_response(card, request, RCODE_COMPLETE); |
| 467 | } | 467 | } |
