-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SD Card can not be accessed #15
Comments
bhi768
pushed a commit
to CandyDevices/kernel_xiaomi_msm8953
that referenced
this issue
Mar 17, 2018
[ Upstream commit 293d264 ] drv->cpumask defaults to cpu_possible_mask in __cpuidle_driver_init(). On PowerNV platform cpu_present could be less than cpu_possible in cases where firmware detects the cpu, but it is not available to the OS. When CONFIG_HOTPLUG_CPU=n, such cpus are not hotplugable at runtime and hence we skip creating cpu_device. This breaks cpuidle on powernv where register_cpu() is not called for cpus in cpu_possible_mask that cannot be hot-added at runtime. Trying cpuidle_register_device() on cpu without cpu_device will cause crash like this: cpu 0xf: Vector: 380 (Data SLB Access) at [c000000ff1503490] pc: c00000000022c8bc: string+0x34/0x60 lr: c00000000022ed78: vsnprintf+0x284/0x42c sp: c000000ff1503710 msr: 9000000000009033 dar: 6000000060000000 current = 0xc000000ff1480000 paca = 0xc00000000fe82d00 softe: 0 irq_happened: 0x01 pid = 1, comm = swapper/8 Linux version 4.11.0-rc2 (sv@sagarika) (gcc version 4.9.4 (Buildroot 2017.02-00004-gc28573e) ) TheScarastic#15 SMP Fri Mar 17 19:32:02 IST 2017 enter ? for help [link register ] c00000000022ed78 vsnprintf+0x284/0x42c [c000000ff1503710] c00000000022ebb8 vsnprintf+0xc4/0x42c (unreliable) [c000000ff1503800] c00000000022ef40 vscnprintf+0x20/0x44 [c000000ff1503830] c0000000000ab61c vprintk_emit+0x94/0x2cc [c000000ff15038a0] c0000000000acc9c vprintk_func+0x60/0x74 [c000000ff15038c0] c000000000619694 printk+0x38/0x4c [c000000ff15038e0] c000000000224950 kobject_get+0x40/0x60 [c000000ff1503950] c00000000022507c kobject_add_internal+0x60/0x2c4 [c000000ff15039e0] c000000000225350 kobject_init_and_add+0x70/0x78 [c000000ff1503a60] c00000000053c288 cpuidle_add_sysfs+0x9c/0xe0 [c000000ff1503ae0] c00000000053aeac cpuidle_register_device+0xd4/0x12c [c000000ff1503b30] c00000000053b108 cpuidle_register+0x98/0xcc [c000000ff1503bc0] c00000000085eaf0 powernv_processor_idle_init+0x140/0x1e0 [c000000ff1503c60] c00000000000cd60 do_one_initcall+0xc0/0x15c [c000000ff1503d20] c000000000833e84 kernel_init_freeable+0x1a0/0x25c [c000000ff1503dc0] c00000000000d478 kernel_init+0x24/0x12c [c000000ff1503e30] c00000000000b564 ret_from_kernel_thread+0x5c/0x78 This patch fixes the bug by passing correct cpumask from powernv-cpuidle driver. Signed-off-by: Vaidyanathan Srinivasan <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Acked-by: Michael Ellerman <[email protected]> [ rjw: Comment massage ] Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
xtrymind
pushed a commit
to xtrymind/android_kernel_xiaomi_msm8953
that referenced
this issue
May 30, 2018
[ Upstream commit 2bbea6e ] when mounting an ISO filesystem sometimes (very rarely) the system hangs because of a race condition between two tasks. PID: 6766 TASK: ffff88007b2a6dd0 CPU: 0 COMMAND: "mount" #0 [ffff880078447ae0] __schedule at ffffffff8168d605 TheScarastic#1 [ffff880078447b48] schedule_preempt_disabled at ffffffff8168ed49 TheScarastic#2 [ffff880078447b58] __mutex_lock_slowpath at ffffffff8168c995 TheScarastic#3 [ffff880078447bb8] mutex_lock at ffffffff8168bdef TheScarastic#4 [ffff880078447bd0] sr_block_ioctl at ffffffffa00b6818 [sr_mod] TheScarastic#5 [ffff880078447c10] blkdev_ioctl at ffffffff812fea50 TheScarastic#6 [ffff880078447c70] ioctl_by_bdev at ffffffff8123a8b3 TheScarastic#7 [ffff880078447c90] isofs_fill_super at ffffffffa04fb1e1 [isofs] #8 [ffff880078447da8] mount_bdev at ffffffff81202570 TheScarastic#9 [ffff880078447e18] isofs_mount at ffffffffa04f9828 [isofs] TheScarastic#10 [ffff880078447e28] mount_fs at ffffffff81202d09 TheScarastic#11 [ffff880078447e70] vfs_kern_mount at ffffffff8121ea8f TheScarastic#12 [ffff880078447ea8] do_mount at ffffffff81220fee TheScarastic#13 [ffff880078447f28] sys_mount at ffffffff812218d6 TheScarastic#14 [ffff880078447f80] system_call_fastpath at ffffffff81698c49 RIP: 00007fd9ea914e9a RSP: 00007ffd5d9bf648 RFLAGS: 00010246 RAX: 00000000000000a5 RBX: ffffffff81698c49 RCX: 0000000000000010 RDX: 00007fd9ec2bc210 RSI: 00007fd9ec2bc290 RDI: 00007fd9ec2bcf30 RBP: 0000000000000000 R8: 0000000000000000 R9: 0000000000000010 R10: 00000000c0ed0001 R11: 0000000000000206 R12: 00007fd9ec2bc040 R13: 00007fd9eb6b2380 R14: 00007fd9ec2bc210 R15: 00007fd9ec2bcf30 ORIG_RAX: 00000000000000a5 CS: 0033 SS: 002b This task was trying to mount the cdrom. It allocated and configured a super_block struct and owned the write-lock for the super_block->s_umount rwsem. While exclusively owning the s_umount lock, it called sr_block_ioctl and waited to acquire the global sr_mutex lock. PID: 6785 TASK: ffff880078720fb0 CPU: 0 COMMAND: "systemd-udevd" #0 [ffff880078417898] __schedule at ffffffff8168d605 TheScarastic#1 [ffff880078417900] schedule at ffffffff8168dc59 TheScarastic#2 [ffff880078417910] rwsem_down_read_failed at ffffffff8168f605 TheScarastic#3 [ffff880078417980] call_rwsem_down_read_failed at ffffffff81328838 TheScarastic#4 [ffff8800784179d0] down_read at ffffffff8168cde0 TheScarastic#5 [ffff8800784179e8] get_super at ffffffff81201cc7 TheScarastic#6 [ffff880078417a10] __invalidate_device at ffffffff8123a8de TheScarastic#7 [ffff880078417a40] flush_disk at ffffffff8123a94b #8 [ffff880078417a88] check_disk_change at ffffffff8123ab50 TheScarastic#9 [ffff880078417ab0] cdrom_open at ffffffffa00a29e1 [cdrom] TheScarastic#10 [ffff880078417b68] sr_block_open at ffffffffa00b6f9b [sr_mod] TheScarastic#11 [ffff880078417b98] __blkdev_get at ffffffff8123ba86 TheScarastic#12 [ffff880078417bf0] blkdev_get at ffffffff8123bd65 TheScarastic#13 [ffff880078417c78] blkdev_open at ffffffff8123bf9b TheScarastic#14 [ffff880078417c90] do_dentry_open at ffffffff811fc7f7 TheScarastic#15 [ffff880078417cd8] vfs_open at ffffffff811fc9cf TheScarastic#16 [ffff880078417d00] do_last at ffffffff8120d53d TheScarastic#17 [ffff880078417db0] path_openat at ffffffff8120e6b2 TheScarastic#18 [ffff880078417e48] do_filp_open at ffffffff8121082b TheScarastic#19 [ffff880078417f18] do_sys_open at ffffffff811fdd33 TheScarastic#20 [ffff880078417f70] sys_open at ffffffff811fde4e TheScarastic#21 [ffff880078417f80] system_call_fastpath at ffffffff81698c49 RIP: 00007f29438b0c20 RSP: 00007ffc76624b78 RFLAGS: 00010246 RAX: 0000000000000002 RBX: ffffffff81698c49 RCX: 0000000000000000 RDX: 00007f2944a5fa70 RSI: 00000000000a0800 RDI: 00007f2944a5fa70 RBP: 00007f2944a5f540 R8: 0000000000000000 R9: 0000000000000020 R10: 00007f2943614c40 R11: 0000000000000246 R12: ffffffff811fde4e R13: ffff880078417f78 R14: 000000000000000c R15: 00007f2944a4b010 ORIG_RAX: 0000000000000002 CS: 0033 SS: 002b This task tried to open the cdrom device, the sr_block_open function acquired the global sr_mutex lock. The call to check_disk_change() then saw an event flag indicating a possible media change and tried to flush any cached data for the device. As part of the flush, it tried to acquire the super_block->s_umount lock associated with the cdrom device. This was the same super_block as created and locked by the previous task. The first task acquires the s_umount lock and then the sr_mutex_lock; the second task acquires the sr_mutex_lock and then the s_umount lock. This patch fixes the issue by moving check_disk_change() out of cdrom_open() and let the caller take care of it. Signed-off-by: Maurizio Lombardi <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the version [13/03/2018] I can not access my SD card.
If I try to, the file manager opens, the SD card is shown, but no files are listed.
It simply shows "Can't load content at the moment"
Like this: https://www.androidpolice.com/wp-content/uploads/2018/03/nexus2cee_Screenshot_20180309-122754.png
The text was updated successfully, but these errors were encountered: