lkml.org 
[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] blk queue io tracing support
Hi Jens,

On Wed, Aug 24, 2005 at 11:28:39AM +0200, Jens Axboe wrote:
> Patch attached is against 2.6.13-rc6-mm2. Still a good idea to apply the
> relayfs read update from the previous mail [*] as well.

There's a small memory leak there on one of the start-tracing
error paths (relay_open failure)... this should plug it up.

cheers.

--
Nathan


Index: 2.6.x-xfs/drivers/block/blktrace.c
===================================================================
--- 2.6.x-xfs.orig/drivers/block/blktrace.c
+++ 2.6.x-xfs/drivers/block/blktrace.c
@@ -73,9 +73,9 @@ int blk_start_trace(struct block_device
{
request_queue_t *q = bdev_get_queue(bdev);
struct blk_user_trace_setup buts;
- struct blk_trace *bt;
+ struct blk_trace *bt = NULL;
char b[BDEVNAME_SIZE];
- int ret = 0;
+ int ret;

if (!q)
return -ENXIO;
@@ -116,9 +116,14 @@ int blk_start_trace(struct block_device
spin_lock_irq(q->queue_lock);
q->blk_trace = bt;
spin_unlock_irq(q->queue_lock);
- ret = 0;
+
+ up(&bdev->bd_sem);
+ return 0;
+
err:
up(&bdev->bd_sem);
+ if (bt)
+ kfree(bt);
return ret;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-31 01:56    [W:0.063 / U:14.360 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site