Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 000abc8d authored by derfelot's avatar derfelot
Browse files

Merge CAF tag LA.UM.8.4.1.r1-03100-8x98.0

* tag 'LA.UM.8.4.1.r1-03100-8x98.0':
  audit: fix error handling in audit_data_to_entry()
  msm: kgsl: Deregister gpu address on memdesc_sg_virt failure
  net: ipv6: Use passed in table for nexthop lookups
  msm: kgsl: Change start variable type to int in kgsl_iommu_add_global
  fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
  ANDROID: xt_qtaguid: Remove tag_entry from process list on untag
  msm: kgsl: Disable all yield packets for secure contexts
  dm verity: skip verity work on I/O errors when system is shutting down
  msm: kgsl: Access map_count only if entry is successfully allocated
  qseecom: Added boundary checks between two subsequent fields
  msm: mdss: hdmi: finetune CEC_REFTIMER:REFTIMER
parents 75b83187 e59fd12e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017,2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -407,7 +407,8 @@ unsigned int a5xx_preemption_pre_ibsubmit(

	/* Enable CP_CONTEXT_SWITCH_YIELD packets in the IB2s */
	*cmds++ = cp_type7_packet(CP_YIELD_ENABLE, 1);
	*cmds++ = 2;
	*cmds++ = ((preempt_style == KGSL_CONTEXT_PREEMPT_STYLE_RINGBUFFER)
				? 0 : 2);

	return (unsigned int) (cmds - cmds_orig);
}
+10 −3
Original line number Diff line number Diff line
@@ -265,8 +265,9 @@ kgsl_mem_entry_create(void)

		/* put this ref in the caller functions after init */
		kref_get(&entry->refcount);
	}
		atomic_set(&entry->map_count, 0);
	}

	return entry;
}
#ifdef CONFIG_DMA_SHARED_BUFFER
@@ -2200,6 +2201,8 @@ static int kgsl_setup_anon_useraddr(struct kgsl_pagetable *pagetable,
{
	/* Map an anonymous memory chunk */

	int ret;

	if (size == 0 || offset != 0 ||
		!IS_ALIGNED(size, PAGE_SIZE))
		return -EINVAL;
@@ -2209,7 +2212,6 @@ static int kgsl_setup_anon_useraddr(struct kgsl_pagetable *pagetable,
	entry->memdesc.flags |= KGSL_MEMFLAGS_USERMEM_ADDR;

	if (kgsl_memdesc_use_cpu_map(&entry->memdesc)) {
		int ret;

		/* Register the address in the database */
		ret = kgsl_mmu_set_svm_region(pagetable,
@@ -2221,7 +2223,12 @@ static int kgsl_setup_anon_useraddr(struct kgsl_pagetable *pagetable,
		entry->memdesc.gpuaddr = (uint64_t) hostptr;
	}

	return memdesc_sg_virt(&entry->memdesc, hostptr);
	ret = memdesc_sg_virt(&entry->memdesc, hostptr);

	if (ret && kgsl_memdesc_use_cpu_map(&entry->memdesc))
		kgsl_mmu_put_gpuaddr(&entry->memdesc);

	return ret;
}

static int match_file(const void *p, struct file *file, unsigned int fd)
+2 −1
Original line number Diff line number Diff line
@@ -199,8 +199,9 @@ static void kgsl_iommu_remove_global(struct kgsl_mmu *mmu,
static void kgsl_iommu_add_global(struct kgsl_mmu *mmu,
		struct kgsl_memdesc *memdesc, const char *name)
{
	u32 bit, start = 0;
	u32 bit;
	u64 size = kgsl_memdesc_footprint(memdesc);
	int start = 0;

	if (memdesc->gpuaddr != 0)
		return;
+2 −1
Original line number Diff line number Diff line
@@ -432,7 +432,8 @@ void kgsl_mmu_put_gpuaddr(struct kgsl_memdesc *memdesc)
	if (memdesc->size == 0 || memdesc->gpuaddr == 0)
		return;

	if (!kgsl_memdesc_is_global(memdesc))
	if (!kgsl_memdesc_is_global(memdesc) &&
			 (KGSL_MEMDESC_MAPPED & memdesc->priv))
		unmap_fail = kgsl_mmu_unmap(pagetable, memdesc);

	/*
+10 −1
Original line number Diff line number Diff line
@@ -77,6 +77,14 @@ struct dm_verity_prefetch_work {
struct buffer_aux {
	int hash_verified;
};
/*
 * While system shutdown, skip verity work for I/O error.
 */
static inline bool verity_is_system_shutting_down(void)
{
	return system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF
		|| system_state == SYSTEM_RESTART;
}

/*
 * Initialize struct buffer_aux for a freshly created buffer.
@@ -543,7 +551,8 @@ static void verity_end_io(struct bio *bio)
{
	struct dm_verity_io *io = bio->bi_private;

	if (bio->bi_error && !verity_fec_is_enabled(io->v)) {
	if (bio->bi_error &&
		(!verity_fec_is_enabled(io->v) || verity_is_system_shutting_down())) {
		verity_finish_io(io, bio->bi_error);
		return;
	}
Loading