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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACygaLCBGMPawMcUYLC76kAGwPV1DqxY0FhqsEArv_tvVxRQFg@mail.gmail.com>
Date:	Mon, 21 Dec 2015 15:34:20 +0800
From:	Wenwei Tao <ww.tao0320@...il.com>
To:	Matias <mb@...htnvm.io>
Cc:	linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: Re: [PATCH] lightnvm: unlock rq and free ppa_list after submission failed

This patch is based on [PATCH] lightnvm: fix bio submission issue
 https://lkml.org/lkml/2015/12/9/394

2015-12-21 15:32 GMT+08:00 Wenwei Tao <ww.tao0320@...il.com>:
> after io submission failed, before free rq, delete rq from
> rrpc's inflight list, leave no bad item in the list. And
> free rq's ppa_list to avoid memory leak.
>
> Signed-off-by: Wenwei Tao <ww.tao0320@...il.com>
> ---
>  drivers/lightnvm/rrpc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index a1e7488..c0886a8 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -843,6 +843,12 @@ static int rrpc_submit_io(struct rrpc *rrpc, struct bio *bio,
>         if (err) {
>                 pr_err("rrpc: I/O submission failed: %d\n", err);
>                 bio_put(bio);
> +               if (!(flags & NVM_IOTYPE_GC)) {
> +                       rrpc_unlock_rq(rrpc, rqd);
> +                       if (rqd->nr_pages > 1)
> +                               nvm_dev_dma_free(rrpc->dev,
> +                       rqd->ppa_list, rqd->dma_ppa_list);
> +               }
>                 return NVM_IO_ERR;
>         }
>
> --
> 1.8.3.1
>
--
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