Merge 5.10.3 into android12-5.10

Changes in 5.10.3
	net: ipconfig: Avoid spurious blank lines in boot log
	x86/split-lock: Avoid returning with interrupts enabled
	exfat: Avoid allocating upcase table using kcalloc()
	soc/tegra: fuse: Fix index bug in get_process_id
	usb: mtu3: fix memory corruption in mtu3_debugfs_regset()
	USB: serial: option: add interface-number sanity check to flag handling
	USB: gadget: f_acm: add support for SuperSpeed Plus
	USB: gadget: f_midi: setup SuperSpeed Plus descriptors
	usb: gadget: f_fs: Re-use SS descriptors for SuperSpeedPlus
	USB: gadget: f_rndis: fix bitrate for SuperSpeed and above
	usb: chipidea: ci_hdrc_imx: Pass DISABLE_DEVICE_STREAMING flag to imx6ul
	ARM: dts: exynos: fix roles of USB 3.0 ports on Odroid XU
	ARM: dts: exynos: fix USB 3.0 VBUS control and over-current pins on Exynos5410
	ARM: dts: exynos: fix USB 3.0 pins supply being turned off on Odroid XU
	coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf()
	coresight: tmc-etr: Check if page is valid before dma_map_page()
	coresight: tmc-etr: Fix barrier packet insertion for perf buffer
	coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf()
	coresight: etm4x: Skip setting LPOVERRIDE bit for qcom, skip-power-up
	coresight: etm4x: Fix accesses to TRCVMIDCTLR1
	coresight: etm4x: Fix accesses to TRCCIDCTLR1
	coresight: etm4x: Fix accesses to TRCPROCSELR
	coresight: etm4x: Handle TRCVIPCSSCTLR accesses
	f2fs: fix to seek incorrect data offset in inline data file
	f2fs: init dirty_secmap incorrectly
	scsi: megaraid_sas: Check user-provided offsets
	HID: i2c-hid: add Vero K147 to descriptor override
	serial_core: Check for port state when tty is in error state
	fscrypt: remove kernel-internal constants from UAPI header
	fscrypt: add fscrypt_is_nokey_name()
	ubifs: prevent creating duplicate encrypted filenames
	ext4: prevent creating duplicate encrypted filenames
	f2fs: prevent creating duplicate encrypted filenames
	Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()
	quota: Sanity-check quota file headers on load
	fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode()
	media: msi2500: assign SPI bus number dynamically
	crypto: af_alg - avoid undefined behavior accessing salg_name
	nl80211: validate key indexes for cfg80211_registered_device
	md: fix a warning caused by a race between concurrent md_ioctl()s
	Linux 5.10.3

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia12e3bc535549040a55f8dfb70921d99882e79f5
This commit is contained in:
Greg Kroah-Hartman
2020-12-27 11:18:19 +01:00
43 changed files with 324 additions and 85 deletions

View File

@@ -111,6 +111,35 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry)
dentry->d_flags &= ~DCACHE_NOKEY_NAME;
}
/**
* fscrypt_is_nokey_name() - test whether a dentry is a no-key name
* @dentry: the dentry to check
*
* This returns true if the dentry is a no-key dentry. A no-key dentry is a
* dentry that was created in an encrypted directory that hasn't had its
* encryption key added yet. Such dentries may be either positive or negative.
*
* When a filesystem is asked to create a new filename in an encrypted directory
* and the new filename's dentry is a no-key dentry, it must fail the operation
* with ENOKEY. This includes ->create(), ->mkdir(), ->mknod(), ->symlink(),
* ->rename(), and ->link(). (However, ->rename() and ->link() are already
* handled by fscrypt_prepare_rename() and fscrypt_prepare_link().)
*
* This is necessary because creating a filename requires the directory's
* encryption key, but just checking for the key on the directory inode during
* the final filesystem operation doesn't guarantee that the key was available
* during the preceding dentry lookup. And the key must have already been
* available during the dentry lookup in order for it to have been checked
* whether the filename already exists in the directory and for the new file's
* dentry not to be invalidated due to it incorrectly having the no-key flag.
*
* Return: %true if the dentry is a no-key name
*/
static inline bool fscrypt_is_nokey_name(const struct dentry *dentry)
{
return dentry->d_flags & DCACHE_NOKEY_NAME;
}
/* crypto.c */
void fscrypt_enqueue_decrypt_work(struct work_struct *);
@@ -244,6 +273,11 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry)
{
}
static inline bool fscrypt_is_nokey_name(const struct dentry *dentry)
{
return false;
}
/* crypto.c */
static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work)
{