Skip to content

Commit

Permalink
firewire: sbp2: fix freeing of unallocated memory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter committed Sep 5, 2009
1 parent 4fe0bad commit baed6b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/firewire/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
}
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);
}
Expand Down

0 comments on commit baed6b8

Please sign in to comment.