* [PATCH 3.9-stable] drbd: fix memory leak
@ 2013-05-08 22:48 Jonghwan Choi
2013-05-10 8:18 ` Philipp Reisner
0 siblings, 1 reply; 2+ messages in thread
From: Jonghwan Choi @ 2013-05-08 22:48 UTC (permalink / raw)
To: 'Jonghwan Choi', linux-kernel
Cc: stable, 'Lars Ellenberg', 'Philipp Reisner'
This patch looks like it should be in the 3.9-stable tree, should we apply
it?
------------------
From: "Lars Ellenberg <lars.ellenberg@linbit.com>"
commit 94ad0a101415978be04945b2787be1e8e8a874db upstream
We forgot to free the disk_conf,
so for each attach/detach cycle we leaked 336 bytes.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
---
drivers/block/drbd/drbd_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index e98da67..54d03d4 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2795,6 +2795,7 @@ void drbd_free_bc(struct drbd_backing_dev *ldev)
blkdev_put(ldev->backing_bdev, FMODE_READ | FMODE_WRITE |
FMODE_EXCL);
blkdev_put(ldev->md_bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+ kfree(ldev->disk_conf);
kfree(ldev);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3.9-stable] drbd: fix memory leak
2013-05-08 22:48 [PATCH 3.9-stable] drbd: fix memory leak Jonghwan Choi
@ 2013-05-10 8:18 ` Philipp Reisner
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Reisner @ 2013-05-10 8:18 UTC (permalink / raw)
To: Jonghwan Choi; +Cc: linux-kernel, stable, 'Lars Ellenberg'
Yes, please.
> This patch looks like it should be in the 3.9-stable tree, should we apply
> it?
>
> ------------------
>
> From: "Lars Ellenberg <lars.ellenberg@linbit.com>"
>
> commit 94ad0a101415978be04945b2787be1e8e8a874db upstream
>
> We forgot to free the disk_conf,
> so for each attach/detach cycle we leaked 336 bytes.
>
> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
> ---
> drivers/block/drbd/drbd_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
> index e98da67..54d03d4 100644
> --- a/drivers/block/drbd/drbd_main.c
> +++ b/drivers/block/drbd/drbd_main.c
> @@ -2795,6 +2795,7 @@ void drbd_free_bc(struct drbd_backing_dev *ldev)
> blkdev_put(ldev->backing_bdev, FMODE_READ | FMODE_WRITE |
> FMODE_EXCL);
> blkdev_put(ldev->md_bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
>
> + kfree(ldev->disk_conf);
> kfree(ldev);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-10 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 22:48 [PATCH 3.9-stable] drbd: fix memory leak Jonghwan Choi
2013-05-10 8:18 ` Philipp Reisner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).