[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFq+wYbRNtDmhMzU+5_LUXsqyw7O=-1BqhJN_j26HF++AQ@mail.gmail.com>
Date: Mon, 28 Nov 2022 15:45:21 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Dan Carpenter <error27@...il.com>
Cc: Jiasheng Jiang <jiasheng@...as.ac.cn>, maximlevitsky@...il.com,
oakad@...oo.com, christophe.jaillet@...adoo.fr, axboe@...nel.dk,
hare@...e.de, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] memstick/ms_block: Add check for alloc_ordered_workqueue
On Sat, 26 Nov 2022 at 09:01, Dan Carpenter <error27@...il.com> wrote:
>
> On Sat, Nov 26, 2022 at 09:25:58AM +0800, Jiasheng Jiang wrote:
> > As the alloc_ordered_workqueue may return NULL pointer,
> > it should be better to add check for the return
> > value.
> > Moreover, the msb->io_queue should be freed if error occurs later.
> >
> > Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks")
> > Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
> > ---
> > Changelog:
> >
> > v1 -> v2:
> >
> > 1. Assign error number to rc if alloc_ordered_workqueue fails.
> > 2. Free msb->io_queue if error occurs later.
> > ---
>
> My other question about this driver, not really directed to you but to
> anyone on the list is where the final destroy_workqueue(msb->io_queue)
> is when we unload the driver.
Good point, it's simply missing somewhere in the path of the
->remove() callback.
Kind regards
Uffe
Powered by blists - more mailing lists