From: Linus Torvalds Date: Sun, 12 May 2019 22:16:31 +0000 (-0400) Subject: Merge tag 'upstream-5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: v5.15~6383 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7a02fa0a8f9ec1b81d57628ca9834563208ef33;p=platform%2Fkernel%2Flinux-starfive.git Merge tag 'upstream-5.2-rc1' of ssh://gitolite./linux/kernel/git/rw/ubifs Pull UBI/UBIFS updates from Richard Weinberger: - fscrypt framework usage updates - One huge fix for xattr unlink - Cleanup of fscrypt ifdefs - Fix for our new UBIFS auth feature * tag 'upstream-5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: wl: Fix uninitialized variable ubifs: Drop unnecessary setting of zbr->znode ubifs: Remove ifdefs around CONFIG_UBIFS_ATIME_SUPPORT ubifs: Remove #ifdef around CONFIG_FS_ENCRYPTION ubifs: Limit number of xattrs per inode ubifs: orphan: Handle xattrs like files ubifs: journal: Handle xattrs like files ubifs: find.c: replace swap function with built-in one ubifs: Do not skip hash checking in data nodes ubifs: work around high stack usage with clang ubifs: remove unused function __ubifs_shash_final ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy() ubifs: remove unnecessary calls to set up directory key --- d7a02fa0a8f9ec1b81d57628ca9834563208ef33 diff --cc fs/ubifs/auth.c index b758004,3d04919..60f43b9 --- a/fs/ubifs/auth.c +++ b/fs/ubifs/auth.c @@@ -85,12 -86,17 +84,16 @@@ int ubifs_prepare_auth_node(struct ubif if (!hash) return -ENOMEM; - hash_desc->tfm = c->hash_tfm; - ubifs_shash_copy_state(c, inhash, hash_desc); + { + SHASH_DESC_ON_STACK(hash_desc, c->hash_tfm); - err = crypto_shash_final(hash_desc, hash); - if (err) - goto out; + hash_desc->tfm = c->hash_tfm; - hash_desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; + ubifs_shash_copy_state(c, inhash, hash_desc); + + err = crypto_shash_final(hash_desc, hash); + if (err) + goto out; + } err = ubifs_hash_calc_hmac(c, hash, auth->hmac); if (err)