From 9c9bdf4d50730fd04b06077e22d7a83b585f26b5 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Tue, 17 Jul 2007 02:15:36 +0200 Subject: firewire: fix memory leak of fw_request instances MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found and debugged by Jay Fenlason . The bug was especially noticeable with direct I/O over fw-sbp2. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-transaction.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/firewire/fw-transaction.h') diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 5abed193f4a6..5ceaccd10564 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h @@ -123,6 +123,10 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode, size_t length, void *callback_data); +/* + * Important note: The callback must guarantee that either fw_send_response() + * or kfree() is called on the @request. + */ typedef void (*fw_address_callback_t)(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, -- cgit v1.2.2