linux/kernel
Tao Huang 17823171af PM / QoS: Do not call pm_qos_set_value_for_cpus()
Which confuse pm_qos_request and dev_pm_qos_request.
So get this bug:
[    0.264863] ==================================================================
[    0.265600] BUG: KASAN: slab-out-of-bounds in find_next_bit+0x38/0x9c
[    0.266241] Read of size 8 at addr ffffffc0d27c4eb0 by task swapper/0/1
[    0.266887]
[    0.267055] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.19.126 #121
[    0.267671] Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
[    0.268370] Call trace:
[    0.268632]  dump_backtrace+0x0/0x220
[    0.269004]  show_stack+0x14/0x1c
[    0.269344]  dump_stack+0xd8/0x118
[    0.269693]  print_address_description+0x80/0x2e4
[    0.270163]  __kasan_report+0x15c/0x1c4
[    0.270550]  kasan_report+0x10/0x18
[    0.270904]  __asan_load8+0x80/0x88
[    0.271259]  find_next_bit+0x38/0x9c
[    0.271620]  cpumask_next+0x20/0x28
[    0.271977]  pm_qos_update_target+0x380/0x65c
[    0.272417]  apply_constraint+0x94/0x13c
[    0.272813]  __dev_pm_qos_add_request+0x204/0x258
[    0.273284]  dev_pm_qos_expose_latency_limit+0x84/0x1ac
[    0.273806]  register_cpu+0x1a8/0x1c4
[    0.274177]  topology_init+0x90/0xd0
[    0.274539]  do_one_initcall+0x1fc/0x3d8
[    0.274937]  do_initcall_level+0x1c4/0x1f8
[    0.275350]  do_basic_setup+0x68/0x80
[    0.275722]  kernel_init_freeable+0x108/0x194
[    0.276161]  kernel_init+0x14/0x2a0
[    0.276514]  ret_from_fork+0x10/0x18
[    0.276870]
[    0.277027] Allocated by task 1:
[    0.277358]  __kasan_kmalloc+0xf0/0x1d4
[    0.277740]  kasan_kmalloc+0xc/0x14
[    0.278083]  __kmalloc+0x114/0x378
[    0.278424]  kobject_get_path+0x60/0xe4
[    0.278804]  kobject_uevent_env+0x174/0x81c
[    0.279217]  kobject_uevent+0x10/0x18
[    0.279581]  device_add+0xa3c/0xe68
[    0.279929]  device_register+0x1c/0x28
[    0.280300]  register_cpu+0x158/0x1c4
[    0.280664]  topology_init+0x90/0xd0
[    0.281018]  do_one_initcall+0x1fc/0x3d8
[    0.281410]  do_initcall_level+0x1c4/0x1f8
[    0.281814]  do_basic_setup+0x68/0x80
[    0.282183]  kernel_init_freeable+0x108/0x194
[    0.282610]  kernel_init+0x14/0x2a0
[    0.282957]  ret_from_fork+0x10/0x18
[    0.283305]
[    0.283461] Freed by task 1:
[    0.283758]  __kasan_slab_free+0x140/0x234
[    0.284164]  kasan_slab_free+0x10/0x1c
[    0.284533]  kfree+0x1a0/0x730
[    0.284840]  kobject_uevent_env+0x208/0x81c
[    0.285248]  kobject_uevent+0x10/0x18
[    0.285615]  device_add+0xa3c/0xe68
[    0.285962]  device_register+0x1c/0x28
[    0.286337]  register_cpu+0x158/0x1c4
[    0.286699]  topology_init+0x90/0xd0
[    0.287054]  do_one_initcall+0x1fc/0x3d8
[    0.287441]  do_initcall_level+0x1c4/0x1f8
[    0.287848]  do_basic_setup+0x68/0x80
[    0.288210]  kernel_init_freeable+0x108/0x194
[    0.288643]  kernel_init+0x14/0x2a0
[    0.288987]  ret_from_fork+0x10/0x18
[    0.289336]
[    0.289498] The buggy address belongs to the object at ffffffc0d27c4e00
[    0.289498]  which belongs to the cache kmalloc-128 of size 128
[    0.290726] The buggy address is located 48 bytes to the right of
[    0.290726]  128-byte region [ffffffc0d27c4e00, ffffffc0d27c4e80)
[    0.291915] The buggy address belongs to the page:
[    0.292395] page:ffffffbf0349f100 count:1 mapcount:0 mapping:ffffffc00a2c7c00 index:0x0
[    0.293184] flags: 0x200(slab)
[    0.293504] raw: 0000000000000200 dead000000000100 dead000000000200 ffffffc00a2c7c00
[    0.294273] raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
[    0.295028] page dumped because: kasan: bad access detected
[    0.295576]
[    0.295731] Memory state around the buggy address:
[    0.296194]  ffffffc0d27c4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[    0.296905]  ffffffc0d27c4e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[    0.297617] >ffffffc0d27c4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[    0.298323]                                      ^
[    0.298787]  ffffffc0d27c4f00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
[    0.299498]  ffffffc0d27c4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[    0.300206] ==================================================================

Fixes: 723feab600 ("ANDROID: GKI: QoS: Enhance framework to support cpu/irq specific QoS requests")
Change-Id: I87d682d30d8147cdba6309a9d4ffd6dcb25e0960
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-09-24 18:01:24 +08:00
..
bpf This is the 4.19.137 stable release 2020-08-05 12:07:48 +02:00
cgroup UPSTREAM: cgroup: Remove unused cgrp variable 2020-08-26 15:41:05 -07:00
configs
debug This is the 4.19.132 stable release 2020-07-09 11:20:59 +02:00
dma Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
events Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
gcov This is the 4.19.119 stable release 2020-04-29 17:26:17 +02:00
irq Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
livepatch livepatch: Nullify obj->mod in klp_module_coming()'s error path 2019-10-07 18:57:10 +02:00
locking locking/lockdep: Fix overflow in presentation of average lock-time 2020-09-03 11:24:21 +02:00
power PM / QoS: Do not call pm_qos_set_value_for_cpus() 2020-09-24 18:01:24 +08:00
printk Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
rcu rcu: Avoid data-race in rcu_gp_fqs_check_wake() 2020-02-11 04:33:55 -08:00
sched Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
time Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
trace Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
.gitignore BACKPORT: Provide in-kernel headers to make extending kernel easier 2019-06-12 12:33:20 +00:00
acct.c acct_on(): don't mess with freeze protection 2019-05-31 06:46:05 -07:00
async.c
audit_fsnotify.c
audit_tree.c audit: Embed key into chunk 2019-12-13 08:51:11 +01:00
audit_watch.c audit_get_nd(): don't unlock parent too early 2019-12-13 08:51:02 +01:00
audit.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
audit.h audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
auditfilter.c audit: fix a net reference leak in audit_list_rules_send() 2020-06-22 09:05:13 +02:00
auditsc.c audit: print empty EXECVE args 2019-12-01 09:17:17 +01:00
backtracetest.c
bounds.c kbuild: fix kernel/bounds.c 'W=1' warning 2018-11-13 11:08:47 -08:00
capability.c LSM: generalize flag passing to security_capable 2020-01-23 08:21:29 +01:00
cfi.c ANDROID: cfi: fix export symbol types 2020-04-29 19:16:15 +02:00
compat.c make 'user_access_begin()' do 'access_ok()' 2020-06-22 09:04:58 +02:00
configs.c
context_tracking.c
cpu_pm.c kernel/cpu_pm: Fix uninitted local in cpu_pm 2020-06-22 09:05:28 +02:00
cpu.c Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
crash_core.c kernel/crash_core.c: print timestamp using time64_t 2018-08-22 10:52:47 -07:00
crash_dump.c
cred.c memcg: account security cred as well to kmemcg 2020-01-09 10:19:00 +01:00
delayacct.c UPSTREAM: delayacct: track delays from thrashing cache pages 2019-03-21 16:25:26 -07:00
dma.c
elfcore.c kernel/elfcore.c: include proper prototypes 2019-10-11 18:21:23 +02:00
exec_domain.c
exit.c This is the 4.19.129 stable release 2020-06-22 10:50:54 +02:00
extable.c
fail_function.c
fork.c BACKPORT: cgroup: cgroup v2 freezer 2020-08-26 15:35:17 -07:00
freezer.c PM / reboot: Eliminate race between reboot and suspend 2018-08-06 12:35:20 +02:00
futex.c futex: Unbreak futex hashing 2020-03-25 08:06:14 +01:00
gen_kheaders.sh UPSTREAM: kheaders: include only headers into kheaders_data.tar.xz 2020-04-16 18:00:25 +00:00
groups.c
hung_task.c kernel: hung_task.c: disable on suspend 2019-04-20 09:16:02 +02:00
iomem.c
irq_work.c irq_work: Do not raise an IPI when queueing work on the local CPU 2019-05-31 06:46:19 -07:00
jump_label.c jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00
kallsyms.c Merge 4.19.133 into android-4.19-stable 2020-07-17 07:54:52 +02:00
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt kconfig: include kernel/Kconfig.preempt from init/Kconfig 2018-08-02 08:06:54 +09:00
kcov.c UPSTREAM: kcov: remote coverage support 2020-01-15 14:51:23 +00:00
kexec_core.c kexec: Allocate decrypted control pages for kdump if SME is enabled 2019-11-24 08:20:29 +01:00
kexec_file.c
kexec_internal.h
kexec.c kexec: add call to LSM hook in original kexec_load syscall 2018-07-16 12:31:57 -07:00
kheaders.c BACKPORT: kheaders: Move from proc to sysfs 2019-06-12 12:33:54 +00:00
kmod.c kmod: make request_module() return an error when autoloading is disabled 2020-04-17 10:48:52 +02:00
kprobes.c kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler 2020-08-21 11:05:33 +02:00
ksysfs.c kernel/ksysfs.c: Call ksysfs_init() early when CONFIG_ROCKCHIP_THUNDER_BOOT=y 2020-05-25 18:20:21 +08:00
kthread.c This is the 4.19.142 stable release 2020-08-26 11:07:03 +02:00
latencytop.c
Makefile This is the 4.19.87 stable release 2019-12-01 09:53:43 +01:00
memremap.c mm/memory_hotplug: shrink zones when offlining memory 2020-01-29 16:43:27 +01:00
module_signing.c modsign: log module name in the event of an error 2018-07-02 11:36:17 +02:00
module-internal.h modsign: log module name in the event of an error 2018-07-02 11:36:17 +02:00
module.c This is the 4.19.141 stable release 2020-08-21 13:01:46 +02:00
notifier.c x86/mm: split vmalloc_sync_all() 2020-03-25 08:06:13 +01:00
nsproxy.c
padata.c padata: purge get_cpu and reorder_via_wq from padata_do_serial 2020-05-27 17:37:36 +02:00
panic.c UPSTREAM: GKI: panic/reboot: allow specifying reboot_mode for panic only 2020-04-17 05:00:40 +00:00
params.c Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
pid_namespace.c signal/pid_namespace: Fix reboot_pid_ns to use send_sig not force_sig 2019-07-26 09:14:01 +02:00
pid.c UPSTREAM: pid: add pidfd_open() 2019-08-12 13:36:37 -04:00
profile.c
ptrace.c ptrace: reintroduce usage of subjective credentials in ptrace_has_cap() 2020-01-23 08:21:29 +01:00
range.c
reboot.c Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-09-24 17:59:50 +08:00
relay.c kernel/relay.c: fix memleak on destroy relay channel 2020-08-26 10:30:59 +02:00
resource.c Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2019-10-28 20:26:28 +08:00
rseq.c rseq: uapi: Declare rseq_cs field as union, update includes 2018-07-10 22:18:52 +02:00
scs.c FROMLIST: scs: add support for stack usage debugging 2019-11-27 12:37:25 -08:00
seccomp.c LSM: generalize flag passing to security_capable 2020-01-23 08:21:29 +01:00
signal.c UPSTREAM: cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop() 2020-08-26 15:35:17 -07:00
smp.c cpu/hotplug: Fix "SMT disabled by BIOS" detection for KVM 2019-02-12 19:47:25 +01:00
smpboot.c smpboot: Remove cpumask from the API 2018-07-03 09:20:44 +02:00
smpboot.h
softirq.c nohz: Fix missing tick reprogram when interrupting an inline softirq 2018-08-03 15:52:10 +02:00
stacktrace.c
stop_machine.c Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 11:25:07 -07:00
sys_ni.c UPSTREAM: signal: support CLONE_PIDFD with pidfd_send_signal 2019-08-12 13:36:37 -04:00
sys.c UPSTREAM: arm64: Tighten the PR_{SET, GET}_TAGGED_ADDR_CTRL prctl() unused arguments 2019-10-07 15:27:39 -04:00
sysctl_binary.c
sysctl.c sched/fair: optimize scheduler for performance 2020-07-16 14:50:45 +08:00
task_work.c
taskstats.c taskstats: fix data-race 2020-01-09 10:18:59 +01:00
test_kprobes.c
torture.c torture: Keep old-school dmesg format 2018-06-25 11:30:10 -07:00
tracepoint.c tracepoint: Fix tracepoint array element size mismatch 2018-10-17 15:35:29 -04:00
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c coredump: fix crash when umh is disabled 2020-05-14 07:57:21 +02:00
up.c
user_namespace.c userns: also map extents in the reverse map to kernel IDs 2018-11-13 11:09:00 -08:00
user-return-notifier.c
user.c ANDROID: proc: Add /proc/uid directory 2019-03-06 15:59:21 +00:00
utsname_sysctl.c sys: don't hold uts_sem while accessing userspace memory 2018-08-11 02:05:53 -05:00
utsname.c
watchdog_hld.c watchdog: Mark watchdog touch functions as notrace 2018-08-30 12:56:40 +02:00
watchdog.c watchdog/softlockup: Enforce that timestamp is valid on boot 2020-02-24 08:34:49 +01:00
workqueue_internal.h UPSTREAM: psi: fix aggregation idle shut-off 2019-03-21 16:25:27 -07:00
workqueue.c ANDROID: Fix wq fp check for CFI builds 2020-04-04 16:30:40 +00:00