Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit baed6b82 authored by Stefan Richter's avatar Stefan Richter
Browse files

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 4fe0badd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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
		fw_error("status write for unknown orb\n");

		kref_put(&orb->kref, free_orb);
	} else {
		fw_error("status write for unknown orb\n");
	}

	fw_send_response(card, request, RCODE_COMPLETE);
}