I got kernel crash error when I added one additional device driver.
Accoding to my debugging, the problem point is here.
./security/selinux/hooks.c:227: list_del_init(&isec->list);
"isec" is null.
This kernel crash always happen if I add additional device driver.
Is there any maximum value related it?
kernel log when it happened
<7>[ 85.866269 / 01-01 00:19:35.110] SELinux: initialized (dev
mmcblk0p28, type ext4), uses xattr
<6>[ 85.875710 / 01-01 00:19:35.110] EXT4-fs (mmcblk0p25): recovery complete
<6>[ 85.876339 / 01-01 00:19:35.110] EXT4-fs (mmcblk0p25): mounted
filesystem with ordered data mode. Opts:
nomblk_io_submit,errors=remount-ro
<7>[ 86.666934 / 01-01 00:19:35.909] SELinux: initialized (dev
mmcblk0p25, type ext4), uses xattr
<6>[ 86.672075 / 01-01 00:19:35.909] fs_mgr: Running
/system/bin/e2fsck -p option on
/dev/block/platform/msm_sdcc.1/by-name/sns start
<6>[ 86.692288 / 01-01 00:19:35.929] e2fsck:
/dev/block/platform/msm_sdcc.1/by-name/sns: clean, 13/512 files,
1074/2048 blocks
<6>[ 86.692452 / 01-01 00:19:35.929] fs_mgr: Running
/system/bin/e2fsck -p option on
/dev/block/platform/msm_sdcc.1/by-name/sns ok
<6>[ 86.696079 / 01-01 00:19:35.929] EXT4-fs (mmcblk0p25): mounted
filesystem with ordered data mode. Opts: barrier=1,data=ordered
<6>[ 87.403271 / 01-01 00:19:36.650] pet_watchdog
<7>[ 87.403502 / 01-01 00:19:36.650] SELinux: initialized (dev
mmcblk0p25, type ext4), uses xattr
<6>[ 87.413165 / 01-01 00:19:36.650] EXT4-fs (mmcblk0p30): recovery complete
<6>[ 87.413791 / 01-01 00:19:36.650] EXT4-fs (mmcblk0p30): mounted
filesystem with ordered data mode. Opts:
nomblk_io_submit,errors=remount-ro
<7>[ 88.156945 / 01-01 00:19:37.399] SELinux: initialized (dev
mmcblk0p30, type ext4), uses xattr
<6>[ 88.161809 / 01-01 00:19:37.399] fs_mgr: Running
/system/bin/e2fsck -p option on
/dev/block/platform/msm_sdcc.1/by-name/cust start
<6>[ 88.182191 / 01-01 00:19:37.419] e2fsck:
/dev/block/platform/msm_sdcc.1/by-name/cust: clean, 11/6400 files,
1438/25600 blocks
<6>[ 88.182358 / 01-01 00:19:37.419] fs_mgr: Running
/system/bin/e2fsck -p option on
/dev/block/platform/msm_sdcc.1/by-name/cust ok
<6>[ 88.186107 / 01-01 00:19:37.419] EXT4-fs (mmcblk0p30): mounted
filesystem with ordered data mode. Opts: barrier=1,data=ordered
<3>[ 193.253053 / 01-01 00:21:22.530] INFO: rcu_preempt self-detected
stall on CPU { 0} (t=10510 jiffies)
<6>[ 193.253082 / 01-01 00:21:22.530] Backtrace for cpu 0 (current):
<4>[ 193.253113 / 01-01 00:21:22.530] [<c010c128>]
(unwind_backtrace+0x0/0x11c) from [<c010acac>]
(smp_send_all_cpu_backtrace+0x50/0xd4)
<4>[ 193.253139 / 01-01 00:21:22.530] [<c010acac>]
(smp_send_all_cpu_backtrace+0x50/0xd4) from [<c01ef3b4>]
(__rcu_pending+0x98/0x428)
<4>[ 193.253164 / 01-01 00:21:22.530] [<c01ef3b4>]
(__rcu_pending+0x98/0x428) from [<c01ef7a4>] (rcu_pending+0x60/0x80)
<4>[ 193.253188 / 01-01 00:21:22.530] [<c01ef7a4>]
(rcu_pending+0x60/0x80) from [<c01f0b1c>]
(rcu_check_callbacks+0xfc/0x1d4)
<4>[ 193.253215 / 01-01 00:21:22.530] [<c01f0b1c>]
(rcu_check_callbacks+0xfc/0x1d4) from [<c01988b8>]
(update_process_times+0x3c/0x6c)
<4>[ 193.253240 / 01-01 00:21:22.530] [<c01988b8>]
(update_process_times+0x3c/0x6c) from [<c01cc7b4>]
(tick_sched_timer+0x9c/0x1cc)
<4>[ 193.253264 / 01-01 00:21:22.530] [<c01cc7b4>]
(tick_sched_timer+0x9c/0x1cc) from [<c01ab33c>]
(__run_hrtimer+0x13c/0x2a4)
<4>[ 193.253287 / 01-01 00:21:22.530] [<c01ab33c>]
(__run_hrtimer+0x13c/0x2a4) from [<c01abf10>]
(hrtimer_interrupt+0xfc/0x23c)
<4>[ 193.253309 / 01-01 00:21:22.530] [<c01abf10>]
(hrtimer_interrupt+0xfc/0x23c) from [<c010b5a4>]
(arch_timer_handler_cp15+0x28/0x38)
<4>[ 193.253334 / 01-01 00:21:22.530] [<c010b5a4>]
(arch_timer_handler_cp15+0x28/0x38) from [<c01ebb84>]
(handle_percpu_devid_irq+0xdc/0x1c0)
<4>[ 193.253359 / 01-01 00:21:22.530] [<c01ebb84>]
(handle_percpu_devid_irq+0xdc/0x1c0) from [<c01e8638>]
(generic_handle_irq+0x20/0x30)
<4>[ 193.253382 / 01-01 00:21:22.530] [<c01e8638>]
(generic_handle_irq+0x20/0x30) from [<c0106860>]
(handle_IRQ+0x7c/0xc0)
<4>[ 193.253405 / 01-01 00:21:22.530] [<c0106860>]
(handle_IRQ+0x7c/0xc0) from [<c01003a4>] (gic_handle_irq+0x90/0x10c)
<4>[ 193.253430 / 01-01 00:21:22.530] [<c01003a4>]
(gic_handle_irq+0x90/0x10c) from [<c0a2c7c0>] (__irq_svc+0x40/0x70)
<4>[ 193.253447 / 01-01 00:21:22.530] Exception stack(0xe3b35dd8 to 0xe3b35e20)
<4>[ 193.253462 / 01-01 00:21:22.530] 5dc0:
e3b61000 e38fa200
<4>[ 193.253482 / 01-01 00:21:22.530] 5de0: e3b35e00 c11486b8
e3b3fdc0 00000000 e3b61000 00000000 00000000 00000000
<4>[ 193.253503 / 01-01 00:21:22.530] 5e00: e3aa2200 00000000
00000000 e3b35e20 c01b5024 c034a334 60000013 ffffffff
<4>[ 193.253528 / 01-01 00:21:22.530] [<c0a2c7c0>]
(__irq_svc+0x40/0x70) from [<c034a334>]
(selinux_set_mnt_opts+0x3e0/0x444)
<4>[ 193.253553 / 01-01 00:21:22.530] [<c034a334>]
(selinux_set_mnt_opts+0x3e0/0x444) from [<c034a3c8>]
(superblock_doinit+0x30/0xb4)
<4>[ 193.253577 / 01-01 00:21:22.530] [<c034a3c8>]
(superblock_doinit+0x30/0xb4) from [<c034a484>]
(selinux_sb_kern_mount+0x38/0x88)
<4>[ 193.253603 / 01-01 00:21:22.530] [<c034a484>]
(selinux_sb_kern_mount+0x38/0x88) from [<c0342e5c>]
(security_sb_kern_mount+0x14/0x1c)
<4>[ 193.253629 / 01-01 00:21:22.530] [<c0342e5c>]
(security_sb_kern_mount+0x14/0x1c) from [<c02504c4>]
(mount_fs+0xe0/0x164)
<4>[ 193.253653 / 01-01 00:21:22.530] [<c02504c4>]
(mount_fs+0xe0/0x164) from [<c0265a50>] (vfs_kern_mount+0x4c/0xb4)
<4>[ 193.253677 / 01-01 00:21:22.530] [<c0265a50>]
(vfs_kern_mount+0x4c/0xb4) from [<c026652c>] (do_kern_mount+0x34/0xd4)
<4>[ 193.253700 / 01-01 00:21:22.530] [<c026652c>]
(do_kern_mount+0x34/0xd4) from [<c0267da8>] (do_mount+0x638/0x6c4)
<4>[ 193.253723 / 01-01 00:21:22.530] [<c0267da8>]
(do_mount+0x638/0x6c4) from [<c0267f9c>] (sys_mount+0x84/0xb8)
<4>[ 193.253746 / 01-01 00:21:22.530] [<c0267f9c>]
(sys_mount+0x84/0xb8) from [<c0105fa0>] (ret_fast_syscall+0x0/0x30)
<6>[ 193.253761 / 01-01 00:21:22.530]
<6>[ 193.253767 / 01-01 00:21:22.530] sending IPI to all other CPUs:
<6>[ 193.254331 / 01-01 00:21:22.530] pet_watchdog
<7>[ 193.255699 / 01-01 00:21:22.530] SELinux: initialized (dev
mmcblk0p30, type ext4), uses xattr
<6>[ 193.309005 / 01-01 00:21:22.570] BMS:
calculate_unusable_charge_uah: [BMS_DEBUG] chip->last_iavg_cal_time =
1174, time_since_last_iavg_cal = 109
<4>[ 193.317970 / 01-01 00:21:22.580] ibat_ua = -128918, vbat_uv =
4275873, ocv_est_uv = 4255504, pc_est = 95, soc_est = 94, n = 0,
delta_ocv_uv = 0, last_ocv_uv = 4236000, pc_new = 0, pc = 0, soc_new =
0, rbatt = 158, slope = 0
<4>[ 193.331226 / 01-01 00:21:22.590] New_cal_SOC = 93, SOC = 93,
batt_temp = 348, rbatt = 158, fcc_uah = 2451000, ocv_charge_uah =
2279430, uuc_uah = 171570, cc_uah = -6418, iavg_ua = -175945
<7>[ 196.578798 / 01-01 00:21:25.831] SELinux: initialized (dev
mmcblk0p1, type vfat), uses genfs_contexts