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]
Date:	Fri, 27 May 2016 16:59:34 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	Minchan Kim <minchan@...nel.org>
Cc:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH 2/7] zram: switch to crypto compress API

On (05/27/16 13:22), Minchan Kim wrote:
[..]
> >  static void zcomp_strm_free(struct zcomp *comp, struct zcomp_strm *zstrm)
> >  {
> > -	if (zstrm->private)
> > -		comp->backend->destroy(zstrm->private);
> > +	if (!IS_ERR_OR_NULL(zstrm->private))
> 
> Let's change private with tfm.

ok.

> 
> > +		crypto_free_comp(zstrm->private);
> >  	free_pages((unsigned long)zstrm->buffer, 1);
> >  	kfree(zstrm);
> >  }
> > @@ -58,13 +55,13 @@ static struct zcomp_strm *zcomp_strm_alloc(struct zcomp *comp, gfp_t flags)
> >  	if (!zstrm)
> >  		return NULL;
> >  
> > -	zstrm->private = comp->backend->create(flags);
> > +	zstrm->private = crypto_alloc_comp(comp->name, 0, 0);
> 
> crypto_alloc_comp uses GPF_KERNEL for allocating tfm and zram uses
> GFP_KERNEL for zcomp_strm_alloc now so there is no point to pass
> gfp_t so let's clean it up.

yes, I realized that after I sent out the patch. it's basically a revert
of 75d8947a36d0c9 ("zram: pass gfp from zcomp frontend to backend"), can
do this as a separate patch in the series, as it's more of a clenup.

I also realized that passing a zcomp pointer to zcomp_strm_free() is
useless; will clean that up.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ