[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YTYm09U6jZUDtB9l@osiris>
Date: Mon, 6 Sep 2021 16:33:55 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>, axboe@...nel.dk,
gregkh@...uxfoundation.org, chaitanya.kulkarni@....com,
atulgopinathan@...il.com, hare@...e.de, maximlevitsky@...il.com,
oakad@...oo.com, ulf.hansson@...aro.org, colin.king@...onical.com,
shubhankarvk@...il.com, baijiaju1990@...il.com, trix@...hat.com,
dongsheng.yang@...ystack.cn, ceph-devel@...r.kernel.org,
miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
sth@...ux.ibm.com, hoeppner@...ux.ibm.com, gor@...ux.ibm.com,
borntraeger@...ibm.com, oberpar@...ux.ibm.com, tj@...nel.org,
linux-s390@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-mmc@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/9] s390/block/dcssblk: add error handling support for
add_disk()
On Mon, Sep 06, 2021 at 01:43:46PM +0200, Gerald Schaefer wrote:
> On Fri, 3 Sep 2021 18:46:26 -0700
> Luis Chamberlain <mcgrof@...nel.org> wrote:
> > > > + rc = device_add_disk(&dev_info->dev, dev_info->gd, NULL);
> > > > + if (rc)
> > > > + goto put_dev;
> > >
> > > This looks not correct to me. We seem to have now in case of an error:
> > >
> > > - reference count imbalance (= memory leak)
> > > - dax cleanup is missing
> >
> > Care to provide an alternative?
>
> See patch below:
>
> From 7053b5f8c0a126c3ef450de3668d9963bd68ceaa Mon Sep 17 00:00:00 2001
> From: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
> Date: Mon, 6 Sep 2021 13:18:53 +0200
> Subject: [PATCH] s390/block/dcssblk: add error handling support for add_disk()
>
> Signed-off-by: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
> ---
> drivers/s390/block/dcssblk.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
Thanks Gerald! FWIW:
Acked-by: Heiko Carstens <hca@...ux.ibm.com>
Powered by blists - more mailing lists