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: <95e32835-426f-36c9-a86a-09563f090f22@oracle.com>
Date:   Fri, 28 Sep 2018 08:45:26 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org, linux-block@...r.kernel.org
Cc:     roger.pau@...rix.com, konrad.wilk@...cle.com, axboe@...nel.dk
Subject: Re: [PATCH] xen/blkfront: correct purging of persistent grants

On 9/28/18 3:28 AM, Juergen Gross wrote:
> Commit a46b53672b2c2e3770b38a4abf90d16364d2584b ("xen/blkfront: cleanup
> stale persistent grants") introduced a regression as purged persistent
> grants were not pu into the list of free grants again. Correct that.
>
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>  drivers/block/xen-blkfront.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index a71d817e900d..429d20131c7e 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -2670,8 +2670,8 @@ static void purge_persistent_grants(struct blkfront_info *info)
>  			list_del(&gnt_list_entry->node);
>  			gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
>  			rinfo->persistent_gnts_c--;
> -			__free_page(gnt_list_entry->page);
> -			kfree(gnt_list_entry);
> +			gnt_list_entry->gref = GRANT_INVALID_REF;
> +			list_add_tail(&gnt_list_entry->node, &rinfo->grants);

Sorry, I don't follow this. What is the purpose of removing the grant
from rinfo->grants list with list_del() and then adding it back with
list_add_tail()?

-boris


>  		}
>  
>  		spin_unlock_irqrestore(&rinfo->ring_lock, flags);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ