Merge android11-5.4.61+ (e0b1644
) into msm-5.4
* refs/heads/tmp-e0b1644: BACKPORT: dmabuf: fix NULL pointer dereference in dma_buf_release() ANDROID: mm/memblock: export memblock_end_of_DRAM ANDROID: ABI: Update allowed list for QCOM ANDROID: x86: configs: gki: add missing CONFIG_BLK_CGROUP ANDROID: ABI: Update allowed list for QCOM ANDROID: kthread: break dependency between worker->lock and task_struct->pi_lock Change-Id: Ia1e6fdce120a69891dad59858a1207211f05fbe7 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
commit
cb91f25930
@ -1 +1 @@
|
||||
LTS_5.4.61_9c7cbdf8b4cf
|
||||
LTS_5.4.61_e0b1644a472e
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1468,6 +1468,7 @@
|
||||
netlink_unicast
|
||||
net_ratelimit
|
||||
new_inode
|
||||
nf_conntrack_destroy
|
||||
nla_memcpy
|
||||
__nla_parse
|
||||
nla_put_64bit
|
||||
@ -1665,6 +1666,7 @@
|
||||
pci_walk_bus
|
||||
pci_write_config_dword
|
||||
pci_write_config_word
|
||||
pci_dev_present
|
||||
PDE_DATA
|
||||
__per_cpu_offset
|
||||
perf_trace_buf_alloc
|
||||
|
@ -19,6 +19,7 @@ CONFIG_UCLAMP_TASK=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_MEMCG_SWAP=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
# CONFIG_FAIR_GROUP_SCHED is not set
|
||||
CONFIG_UCLAMP_TASK_GROUP=y
|
||||
|
@ -84,8 +84,7 @@ static void dma_buf_release(struct dentry *dentry)
|
||||
int dtor_ret = 0;
|
||||
|
||||
dmabuf = dentry->d_fsdata;
|
||||
|
||||
if (!dmabuf)
|
||||
if (unlikely(!dmabuf))
|
||||
return;
|
||||
|
||||
msm_dma_buf = to_msm_dma_buf(dmabuf);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <uapi/linux/sched/types.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/task.h>
|
||||
#include <linux/sched/wake_q.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/err.h>
|
||||
@ -806,14 +807,15 @@ static void kthread_insert_work_sanity_check(struct kthread_worker *worker,
|
||||
/* insert @work before @pos in @worker */
|
||||
static void kthread_insert_work(struct kthread_worker *worker,
|
||||
struct kthread_work *work,
|
||||
struct list_head *pos)
|
||||
struct list_head *pos,
|
||||
struct wake_q_head *wake_q)
|
||||
{
|
||||
kthread_insert_work_sanity_check(worker, work);
|
||||
|
||||
list_add_tail(&work->node, pos);
|
||||
work->worker = worker;
|
||||
if (!worker->current_work && likely(worker->task))
|
||||
wake_up_process(worker->task);
|
||||
wake_q_add(wake_q, worker->task);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -831,15 +833,19 @@ static void kthread_insert_work(struct kthread_worker *worker,
|
||||
bool kthread_queue_work(struct kthread_worker *worker,
|
||||
struct kthread_work *work)
|
||||
{
|
||||
bool ret = false;
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
unsigned long flags;
|
||||
bool ret = false;
|
||||
|
||||
raw_spin_lock_irqsave(&worker->lock, flags);
|
||||
if (!queuing_blocked(worker, work)) {
|
||||
kthread_insert_work(worker, work, &worker->work_list);
|
||||
kthread_insert_work(worker, work, &worker->work_list, &wake_q);
|
||||
ret = true;
|
||||
}
|
||||
raw_spin_unlock_irqrestore(&worker->lock, flags);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_queue_work);
|
||||
@ -857,6 +863,7 @@ void kthread_delayed_work_timer_fn(struct timer_list *t)
|
||||
struct kthread_delayed_work *dwork = from_timer(dwork, t, timer);
|
||||
struct kthread_work *work = &dwork->work;
|
||||
struct kthread_worker *worker = work->worker;
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
@ -873,15 +880,18 @@ void kthread_delayed_work_timer_fn(struct timer_list *t)
|
||||
/* Move the work from worker->delayed_work_list. */
|
||||
WARN_ON_ONCE(list_empty(&work->node));
|
||||
list_del_init(&work->node);
|
||||
kthread_insert_work(worker, work, &worker->work_list);
|
||||
kthread_insert_work(worker, work, &worker->work_list, &wake_q);
|
||||
|
||||
raw_spin_unlock_irqrestore(&worker->lock, flags);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
}
|
||||
EXPORT_SYMBOL(kthread_delayed_work_timer_fn);
|
||||
|
||||
static void __kthread_queue_delayed_work(struct kthread_worker *worker,
|
||||
struct kthread_delayed_work *dwork,
|
||||
unsigned long delay)
|
||||
unsigned long delay,
|
||||
struct wake_q_head *wake_q)
|
||||
{
|
||||
struct timer_list *timer = &dwork->timer;
|
||||
struct kthread_work *work = &dwork->work;
|
||||
@ -897,7 +907,7 @@ static void __kthread_queue_delayed_work(struct kthread_worker *worker,
|
||||
* on that there's no such delay when @delay is 0.
|
||||
*/
|
||||
if (!delay) {
|
||||
kthread_insert_work(worker, work, &worker->work_list);
|
||||
kthread_insert_work(worker, work, &worker->work_list, wake_q);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -930,17 +940,21 @@ bool kthread_queue_delayed_work(struct kthread_worker *worker,
|
||||
unsigned long delay)
|
||||
{
|
||||
struct kthread_work *work = &dwork->work;
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
unsigned long flags;
|
||||
bool ret = false;
|
||||
|
||||
raw_spin_lock_irqsave(&worker->lock, flags);
|
||||
|
||||
if (!queuing_blocked(worker, work)) {
|
||||
__kthread_queue_delayed_work(worker, dwork, delay);
|
||||
__kthread_queue_delayed_work(worker, dwork, delay, &wake_q);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
raw_spin_unlock_irqrestore(&worker->lock, flags);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_queue_delayed_work);
|
||||
@ -969,6 +983,7 @@ void kthread_flush_work(struct kthread_work *work)
|
||||
KTHREAD_WORK_INIT(fwork.work, kthread_flush_work_fn),
|
||||
COMPLETION_INITIALIZER_ONSTACK(fwork.done),
|
||||
};
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
struct kthread_worker *worker;
|
||||
bool noop = false;
|
||||
|
||||
@ -981,15 +996,18 @@ void kthread_flush_work(struct kthread_work *work)
|
||||
WARN_ON_ONCE(work->worker != worker);
|
||||
|
||||
if (!list_empty(&work->node))
|
||||
kthread_insert_work(worker, &fwork.work, work->node.next);
|
||||
kthread_insert_work(worker, &fwork.work,
|
||||
work->node.next, &wake_q);
|
||||
else if (worker->current_work == work)
|
||||
kthread_insert_work(worker, &fwork.work,
|
||||
worker->work_list.next);
|
||||
worker->work_list.next, &wake_q);
|
||||
else
|
||||
noop = true;
|
||||
|
||||
raw_spin_unlock_irq(&worker->lock);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
|
||||
if (!noop)
|
||||
wait_for_completion(&fwork.done);
|
||||
}
|
||||
@ -1067,6 +1085,7 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker,
|
||||
unsigned long delay)
|
||||
{
|
||||
struct kthread_work *work = &dwork->work;
|
||||
DEFINE_WAKE_Q(wake_q);
|
||||
unsigned long flags;
|
||||
int ret = false;
|
||||
|
||||
@ -1085,9 +1104,12 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker,
|
||||
|
||||
ret = __kthread_cancel_work(work, true, &flags);
|
||||
fast_queue:
|
||||
__kthread_queue_delayed_work(worker, dwork, delay);
|
||||
__kthread_queue_delayed_work(worker, dwork, delay, &wake_q);
|
||||
out:
|
||||
raw_spin_unlock_irqrestore(&worker->lock, flags);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_mod_delayed_work);
|
||||
|
@ -1630,6 +1630,7 @@ phys_addr_t __init_memblock memblock_end_of_DRAM(void)
|
||||
|
||||
return (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(memblock_end_of_DRAM);
|
||||
|
||||
static phys_addr_t __init_memblock __find_max_addr(phys_addr_t limit)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user