Wind River Support Network

HomeDefectsLIN6-9015
Fixed

LIN6-9015 : kernel panic after mounting ubi in preempt rt kernel

Created: Dec 8, 2014    Updated: Dec 3, 2018
Resolved Date: Jan 12, 2015
Found In Version: 6.0.0.13
Fix Version: 6.0.0.17
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: BSP

Description

Can't mount ubifs using preempt-rt kernel with WRlinux6.0 on xlp208 board.
When I try to reproduce this in our reference board, I found I can't attach a mtd partition to ubi by using ubiattach.
The ubiattach will exit by "segmentation fault" as the following log shows:
root@localhost:~# flash_eraseall /dev/mtd7
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 512 Kibyte @ 3ff80000 -- 100 % complete 
root@localhost:~# ubiattach /dev/ubi_ctrl -m 7
Segmentation fault

And the following kernel log can be see in dmesg:

UBI: attaching mtd7 to ubi0
UBI: scanning is finished
UBI: empty MTD device detected
CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffffc0777714
Oops[#1]:
CPU: 0 PID: 1070 Comm: ubiattach Not tainted 3.10.55-ltsi-rt55-WR6.0.0.13_preempt-rt #2
task: c0000000a0534f28 ti: c0000000a44d0000 task.ti: c0000000a44d0000
$ 0   : 0000000000000000 ffffffffc0777a68 0000000000000000 0000000000000017
$ 4   : c0000000bb51e338 0000000000000001 0000000000000000 c0000000bb5a4004
$ 8   : c0000000bb684500 0000000000000000 0000000000040000 0000000000000000
$12   : c0000000a44df8b0 ffffffffc06a34ac 0000000000000000 c0000000bb684500
$16   : 0000000000000000 c0000000bb684000 c0000000bb684500 c0000000bb685500
$20   : c0000000bb51e338 0000000000000200 c0000000bb51e018 000000000000001c
$24   : 0000000000000000 ffffffffc0779760                                  
$28   : c0000000a44d0000 c0000000a44df828 c0000000a44df828 ffffffffc0777714
Hi    : 0000000000000000
Lo    : 000000000000001c
epc   : 0000000000000000           (null)
    Not tainted
ra    : ffffffffc0777714 nand_write_subpage_hwecc+0x11c/0x238
Status: 7400f8e3	KX SX UX KERNEL EXL IE 
Cause : 00800008
BadVA : 0000000000000000
PrId  : 000c1501 (Broadcom XLPII)
Modules linked in:
Process ubiattach (pid: 1070, threadinfo=c0000000a44d0000, task=c0000000a0534f28, tls=0000006577c3dc00)
Stack : 0000000000000017 0000000000000001 c0000000bb5a4004 0000000000000000
  0000000000000000 00000008bb550a38 c0000000bb51e018 c0000000bb51e018
  c0000000bb51e018 c0000000bb51e338 0000000000040000 0000000000000000
  0000000000000400 0000000000000000 c0000000bb51e018 0000000000040000
  c0000000a44df8b8 ffffffffc0777a68 c0000000bb684500 0000000000000000
  c0000000bb51e338 0000000000000400 c0000000a9ebc400 0000000000040000
  0000000000000400 c0000000a44df9c8 c0000000a44df908 ffffffffc07793c4
  0000000000000000 c0000000a0534f28 0000000000000000 0000000000000000
  00000000000000e0 0000000000000000 000000000000007f 0000000000000000
  ffffffffc0da0000 c0000000a44df9f0 0000000000000000 0000000000000000
  ...
Call Trace:
[<ffffffffc0777a68>] nand_write_page+0x188/0x1b8
[<ffffffffc07793c4>] nand_do_write_ops+0x26c/0x470
[<ffffffffc07797d0>] nand_write+0x70/0xb0
[<ffffffffc02a4260>] unpin_current_cpu+0x28/0xc0
[<ffffffffc078fa8c>] ubi_io_write+0x134/0x6a8
[<ffffffffc07948fc>] ubi_early_get_peb+0x12c/0x230
[<ffffffffc0783768>] create_vtbl+0xc0/0x230
[<ffffffffc0783ea4>] ubi_read_volume_table+0x2a4/0xb50
[<ffffffffc03c0b14>] kfree+0xe4/0x318
[<ffffffffc07954cc>] ubi_attach+0xacc/0x1520
[<ffffffffc0788058>] ubi_attach_mtd_dev+0x708/0xda8
[<ffffffffc0789a18>] ctrl_cdev_ioctl+0xf8/0x210
[<ffffffffc03e9390>] do_vfs_ioctl+0x528/0x738
[<ffffffffc02e0648>] add_preempt_count+0xd0/0x140
[<ffffffffc03c072c>] kmem_cache_free+0xdc/0x388
[<ffffffffc03e9650>] SyS_ioctl+0xb0/0x100
[<ffffffffc03d17f0>] do_sys_open+0x198/0x220
[<ffffffffc027a884>] handle_sys64+0x44/0x68
[<ffffffffc03d2740>] vfs_read+0x138/0x1a0
Code: (Bad address in epc)
---[ end trace 0000000000000002 ]---

Steps to Reproduce

1. /opt/WRLX6/wrlinux-6/wrlinux/configure --enable-board=bcm-xlp --enable-kernel=preempt-rt --enable-rootfs=glibc_std --enable-bootimage=ubifs --with-mkubifs-args=-m 2048 -e 129024 -c 1996 --enable-jobs=8 --enable-parallel-pkgbuilds=8 --enable-reconfig --with-rcpl-version=0013

2. boot a xlp9 board, erase and attach mtd7 to ubi
root@localhost:~# flash_eraseall /dev/mtd7
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 512 Kibyte @ 3ff80000 -- 100 % complete 
root@localhost:~# ubiattach /dev/ubi_ctrl -m 7
Segmentation fault
root@localhost:~# 

Other Downloads


Live chat
Online