lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5002451.SWhbVAhVg4@fat-tyre>
Date:	Fri, 10 May 2013 10:18:26 +0200
From:	Philipp Reisner <philipp.reisner@...bit.com>
To:	Jonghwan Choi <jhbird.choi@...sung.com>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	'Lars Ellenberg' <lars.ellenberg@...bit.com>
Subject: Re: [PATCH 3.9-stable] drbd: fix memory leak

Yes, please.

> This patch looks like it should be in the 3.9-stable tree, should we apply
> it?
> 
> ------------------
> 
> From: "Lars Ellenberg <lars.ellenberg@...bit.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@...bit.com>
> Signed-off-by: Lars Ellenberg <lars.ellenberg@...bit.com>
> Signed-off-by: Jens Axboe <axboe@...nel.dk>
> Signed-off-by: Jonghwan Choi <jhbird.choi@...sung.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);
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ