ddr, size);
>- else
>+ else if (addr)
> memblock_free_late(__pa(addr), size);
> }
>
>Can you update with this fix?
Sure.
>
>Thank you,
>
>
>On Fri, 12 Apr 2024 22:18:20 +0900
>Masami Hiramatsu (Google) wrote:
>
>> On Fri
On Fri, Apr 12, 2024 at 04:34:48PM +0900, Masami Hiramatsu wrote:
>On Fri, 12 Apr 2024 10:41:04 +0800
>qiang4.zh...@linux.intel.com wrote:
>
>> From: Qiang Zhang
>>
>> On the time to free xbc memory, memblock has handed over memory to buddy
>> allocator. So it
On Fri, Apr 12, 2024 at 10:03:26AM +0800, qiang4.zh...@linux.intel.com wrote:
>From: Qiang Zhang
>
>On the time to free xbc memory, memblock has handed over memory to buddy
>allocator. So it doesn't make sense to free memory back to memblock.
>memblock_free() called by xbc_exit()
From: Zqiang
Add the irq_work_queue() call stack into the KASAN auxiliary
stack in order to improve KASAN reports. this will let us know
where the irq work be queued.
Signed-off-by: Zqiang
---
kernel/irq_work.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
From: Zqiang
[2.670635] BUG: sleeping function called from invalid context
at kernel/locking/rtmutex.c:951
[2.670638] in_atomic(): 0, irqs_disabled(): 1, non_block: 0,
pid: 19, name: pgdatinit0
[2.670768] Call Trace:
[2.670800] dump_stack+0x93/0xc2
[2.670826]
From: Zqiang
lo->lo_refcnt = 0
CPU0 CPU1
lo_open()lo_open()
mutex_lock(>lo_mutex)
atomic_inc(>lo_refcnt)
lo_refcnt == 1
mutex_unlock(>lo_mutex)
From: Zqiang
lo->lo_refcnt = 0
CPU0 CPU1
lo_open()lo_open()
mutex_lock(>lo_mutex)
atomic_inc(>lo_refcnt)
lo_refcnt == 1
mutex_unlock(>lo_mutex)
From: Zqiang
The syzbot report a memleak follow:
BUG: memory leak
unreferenced object 0x888101b41d00 (size 120):
comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
backtrace:
[] alloc_pid+0x66/0x560
[] copy_process+0x1465/0x25e0
[] kernel_clone+0xf3/0x670
[]
From: Zqiang
The syzbot report a memleak follow:
BUG: memory leak
unreferenced object 0x888101b41d00 (size 120):
comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
backtrace:
[] alloc_pid+0x66/0x560
[] copy_process+0x1465/0x25e0
[] kernel_clone+0xf3/0x670
[]
From: Zqiang
The syzbot report a memleak follow:
BUG: memory leak
unreferenced object 0x888101b41d00 (size 120):
comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
backtrace:
[] alloc_pid+0x66/0x560
[] copy_process+0x1465/0x25e0
[] kernel_clone+0xf3/0x670
[]
From: Zqiang
The syzbot report a memleak follow:
BUG: memory leak
unreferenced object 0x888101b41d00 (size 120):
comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
backtrace:
[] alloc_pid+0x66/0x560
[] copy_process+0x1465/0x25e0
[] kernel_clone+0xf3/0x670
[]
From: Zqiang
BUG: using smp_processor_id() in preemptible [] code:
syz-executor.0/15841
caller is debug_smp_processor_id+0x20/0x24
lib/smp_processor_id.c:64
The smp_processor_id() is used in a code segment when
preemption has been disabled, otherwise, when preemption
is enabled this
From: Zqiang
The debug_work_activate() is called on the premise that
the work can be inserted, because if wq be in WQ_DRAINING
status, insert work may be failed.
Fixes: e41e704bc4f4 ("workqueue: improve destroy_workqueue() debuggability")
Signed-off-by: Zqiang
Reviewed-by: Lai Jiangshan
---
From: Zqiang
The RCU read critical area already by preempt_disable/enable()
(equivalent to rcu_read_lock_sched/unlock_sched()) mark, so remove
rcu_read_lock/unlock().
Signed-off-by: Zqiang
---
kernel/workqueue.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/workqueue.c
From: Zqiang
Add free per-cpu existing krcp's page cache operation in shrink callback
function, and also during shrink period, simple delay schedule fill page
work, to avoid refill page while free krcp page cache.
Signed-off-by: Zqiang
Co-developed-by: Uladzislau Rezki (Sony)
---
v1->v4:
From: Zqiang
The debug_work_activate() is called on the premise that
the work can be inserted, because if wq be in WQ_DRAINING
status, insert work may be failed.
Signed-off-by: Zqiang
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c
From: Zqiang
Add free per-cpu existing krcp's page cache operation, when
the system is under memory pressure.
Signed-off-by: Zqiang
Co-developed-by: Uladzislau Rezki (Sony)
---
v1->v2->v3->v4:
During the test a page shrinker is pretty active, because of low memory
condition. callback
From: Zqiang
Call Trace:
__dump_stack [inline]
dump_stack+0x107/0x163
print_address_description.constprop.0.cold+0x5b/0x2f8
__kasan_report [inline]
kasan_report.cold+0x7c/0xd8
uprobe_cmp [inline]
__uprobe_cmp [inline]
rb_find_add [inline]
__insert_uprobe [inline]
insert_uprobe [inline]
From: Zqiang
Add free per-cpu existing krcp's page cache operation, when
the system is under memory pressure.
Signed-off-by: Zqiang
---
kernel/rcu/tree.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index
From: Zqiang
Add free per-cpu existing krcp's page cache operation, when
the system is under memory pressure.
Signed-off-by: Zqiang
---
kernel/rcu/tree.c | 25 +
1 file changed, 25 insertions(+)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index
From: Zqiang
Add free per-cpu existing krcp's page cache operation, when
the system is under memory pressure.
Signed-off-by: Zqiang
---
kernel/rcu/tree.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index
From: Zqiang
Due to for_each_process_thread belongs to RCU read operation,
need to add rcu_read_lock/unlock() protection.
Signed-off-by: Zqiang
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index
From: Zqiang
Due to kworker also is kernel thread, it's already included
PF_KTHREAD mask, so remove PF_WQ_WORKER mask.
Signed-off-by: Zqiang
---
kernel/power/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/process.c b/kernel/power/process.c
index
From: Zqiang
If CPUs go offline, the corresponding krcp's page cache can
not be use util the CPU come back online, or maybe the CPU
will never go online again, this commit therefore free krcp's
page cache when CPUs go offline.
Signed-off-by: Zqiang
---
kernel/rcu/tree.c | 47
From: Zqiang
This patch tracing workqueue name instead of it's address, the
new format is as follows.
workqueue_queue_work: work struct=84e3df56 function=
drm_fb_helper_dirty_work workqueue=events req_cpu=256 cpu=1
This tell us to know which workqueue our work is queued.
From: Zqiang
Due to freeary function is called with spinlock be held,
the synchronize_rcu function may be called in kfree_rcu
function, the schedule may be happen in spinlock critical
region, need to replace kfree_rcu() with call_rcu().
Fixes: 693a8b6eecce ("ipc,rcu: Convert call_rcu(free_un)
From: Zqiang
The dlfb_alloc_urb_list function is called in dlfb_usb_probe function,
after that if an error occurs, the dlfb_free_urb_list function need to
be called.
BUG: memory leak
unreferenced object 0x88810adde100 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294947788 (age 19.520s)
From: Zqiang
When a CPU offline, the per-cpu quarantine's offline be set true,
after this, if the quarantine_put be called in this CPU, the objects
will be free and return false, free objects doesn't to be done, due
to return false, the slab memory manager will free this objects.
Fixes:
From: Zqiang
Add kasan_record_aux_stack function for kvfree_call_rcu function to
record call stacks.
Cc: Walter Wu
Cc: Andrey Ryabinin
Cc: Alexander Potapenko
Cc: "Paul E. McKenney"
Signed-off-by: Zqiang
---
v1->v2:
Add Cc tags.
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+),
From: Zqiang
Workqueue can ensure the multiple same sdp->work sequential
execution in rcu_gp_wq, not need srcu_cblist_invoking to
prevent concurrent execution, so remove it.
Signed-off-by: Zqiang
---
include/linux/srcutree.h | 1 -
kernel/rcu/srcutree.c| 8 ++--
2 files changed, 2
From: Zqiang
Add kasan_record_aux_stack function for kvfree_call_rcu function to
record call stacks.
Signed-off-by: Zqiang
---
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index da3414522285..a252b2f0208d 100644
From: Zqiang
Add 'kthread_flush_delayed_work' func, the principle of
this func is wait for a dwork to finish executing the
last queueing.
Signed-off-by: Zqiang
---
kernel/kthread.c | 24
1 file changed, 24 insertions(+)
diff --git a/kernel/kthread.c
From: Zqiang
When someone CPU offlined, the 'kthread_worker' which bind this CPU,
will run anywhere, if this CPU online, recovery of 'kthread_worker'
affinity by cpuhp notifiers.
Signed-off-by: Zqiang
---
v1->v2:
rename variable kworker_online to kthread_worker_online.
add 'cpuhp_node' and
From: Zqiang
In 'io_wqe_worker' thread, if the work which in 'wqe->work_list' be
finished, the 'wqe->work_list' is empty, and after that the
'__io_worker_idle' func return false, the task state is TASK_RUNNING,
need to be set TASK_INTERRUPTIBLE before call schedule_timeout func.
Signed-off-by:
From: Zqiang
When someone CPU offlined, the 'kthread_worker' which bind this CPU,
will run anywhere, if this CPU online, recovery of 'kthread_worker'
affinity by cpuhp notifiers.
Signed-off-by: Zqiang
---
include/linux/kthread.h | 2 ++
kernel/kthread.c| 35
From: Zqiang
The set CPU affinity func 'do_set_cpus_allowed' may be operate
'task_rq', need add rq lock protect, replace 'pi_lock' spinlock
protect with task_rq_lock func.
Signed-off-by: Zqiang
---
fs/io-wq.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/io-wq.c
From: Zqiang
The pwq's rcu callback func only to release 'pwq' resources,
can use 'kfree_rcu' instead of 'call_rcu' func.
Signed-off-by: Zqiang
---
kernel/workqueue.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index
From: Zqiang
There is a small race window when a delayed work is being canceled and
the work still might be queued from the timer_fn:
CPU0CPU1
kthread_cancel_delayed_work_sync()
__kthread_cancel_work_sync()
__kthread_cancel_work()
From: Zqiang
If an error occurs after call 'usb_assign_descriptors' func, the
'usb_free_all_descriptors' need to be call to release memory space
occupied by function descriptors.
Signed-off-by: Zqiang
---
drivers/usb/gadget/function/f_printer.c | 1 +
1 file changed, 1 insertion(+)
diff
39 matches
Mail list logo