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
| ||
|
Date: Fri, 21 Jun 2019 15:00:08 -0700 From: Eric Biggers <ebiggers@...nel.org> To: Chandan Rajendra <chandan@...ux.ibm.com> Cc: linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-fscrypt@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca, jaegeuk@...nel.org, yuchao0@...wei.com, hch@...radead.org Subject: Re: [PATCH V3 3/7] fscrypt: remove struct fscrypt_ctx On Sun, Jun 16, 2019 at 09:38:09PM +0530, Chandan Rajendra wrote: > -/** > - * fscrypt_get_ctx() - Get a decryption context > - * @gfp_flags: The gfp flag for memory allocation > - * > - * Allocate and initialize a decryption context. > - * > - * Return: A new decryption context on success; an ERR_PTR() otherwise. > - */ > -struct fscrypt_ctx *fscrypt_get_ctx(gfp_t gfp_flags) > -{ > - struct fscrypt_ctx *ctx; > - unsigned long flags; > - > - /* > - * First try getting a ctx from the free list so that we don't have to > - * call into the slab allocator. > - */ > - spin_lock_irqsave(&fscrypt_ctx_lock, flags); > - ctx = list_first_entry_or_null(&fscrypt_free_ctxs, > - struct fscrypt_ctx, free_list); > - if (ctx) > - list_del(&ctx->free_list); > - spin_unlock_irqrestore(&fscrypt_ctx_lock, flags); > - if (!ctx) { > - ctx = kmem_cache_zalloc(fscrypt_ctx_cachep, gfp_flags); > - if (!ctx) > - return ERR_PTR(-ENOMEM); > - ctx->flags |= FS_CTX_REQUIRES_FREE_ENCRYPT_FL; > - } else { > - ctx->flags &= ~FS_CTX_REQUIRES_FREE_ENCRYPT_FL; > - } > - return ctx; > -} > -EXPORT_SYMBOL(fscrypt_get_ctx); FS_CTX_REQUIRES_FREE_ENCRYPT_FL is no longer used, so should be removed. - Eric
Powered by blists - more mailing lists