UBI: add max_beb_per1024 parameter / ioctl
Subsystems (5)
v3 cover UBI: add max_beb_per1024 parameter / ioctl
This patch serie introduce, step by step the kernel module parameter max_beb_per1024, then the ioctl and finally drop the kernel config option CONFIG_MTD_UBI_BEB_LIMIT.
It's based on top of linux-ubi/master (4ebb4b5)
Changelog:
V2..V3:
* Suppress the possibility to have an empty string for vid_hdr_offs and max_beb_per1024 and change the module info accordingly.
* add the Reviewed-by of Shmulik on the 1st patch.
V1..V2:
* The upper bound of max_beb_per1024 is checked and set to 768
* The vid_hdr_offs parameter can now be an empty string in order to have a kernel parameter like that: mtd.ubi=2,,25
* The max_beb_per1024 parameter can also be empty (just for consistency with vid_hdr_offs)
* The comment in ubi-user.h has been adjusted with the new range 0-768 and the term "default kernel value" is used in place of MTD_UBI_DEFAULT_BEB_LIMIT or CONFIG_MTD_UBI_BEB_LIMIT
* As max_beb_per1024 can be safely null, the config range of MTD_UBI_BEB_LIMIT has been updates to 0..768
* For the ioctl, max_beb_per1024 is now an __u16, so that we are not limited to 255 anymore.
* The comment on the default value of max_beb_per1024 has been adjusted before and after the ioctl patch.
Best Regards
Richard.
Richard Genoud (6):
UBI: prepare for max_beb_per1024 module parameter addition
UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
UBI: replace MTD_UBI_BEB_LIMIT with module parameter
UBI: add ioctl for max_beb_per1024
UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
arch/arm/configs/sam9_l9260_defconfig | 1 - drivers/mtd/ubi/Kconfig | 26 -------------- drivers/mtd/ubi/build.c | 62 +++++++++++++++++++++++--------- drivers/mtd/ubi/cdev.c | 3 +- drivers/mtd/ubi/ubi.h | 6 +++- include/mtd/ubi-user.h | 19 +++++++++- 6 files changed, 69 insertions(+), 48 deletions(-)
Signature · 1 line
1.7.2.5
PATCH v3 1/6 UBI: prepare for max_beb_per1024 module parameter addition
This patch prepare the way for the addition of max_beb_per1024 module parameter.
There's no functional change.
--- drivers/mtd/ubi/build.c | 14 ++++++++------ drivers/mtd/ubi/cdev.c | 3 ++- drivers/mtd/ubi/ubi.h | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-)
drivers/mtd/ubi/build.c +8 -6
@@ -602,6 +602,7 @@ static int get_bad_peb_limit(const struct ubi_device *ubi, int max_beb_per1024)/** * io_init - initialize I/O sub-system for a given UBI device. * @ubi: UBI device description object +* @max_beb_per1024: maximum expected number of bad PEB per 1024 PEB * * If @ubi->vid_hdr_offset or @ubi->leb_start is zero, default offsets are * assumed:
@@ -614,10 +615,8 @@ static int get_bad_peb_limit(const struct ubi_device *ubi, int max_beb_per1024)* This function returns zero in case of success and a negative error code in * case of failure. */ -static int io_init (struct ubi_device *ubi) +static int io_init (struct ubi_device *ubi,int max_beb_per1024) { -const int max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; -if (ubi->mtd->numeraseregions !=0 ) {/* * Some flashes have several erase regions. Different regions
@@ -839,6 +838,7 @@ static int autoresize(struct ubi_device *ubi, int vol_id)* @mtd: MTD device description object * @ubi_num: number to assign to the new UBI device * @vid_hdr_offset: VID header offset +* @max_beb_per1024: maximum number of expected bad blocks per 1024 eraseblocks * * This function attaches MTD device @mtd_dev to UBI and assign @ubi_num number * to the newly created UBI device, unless @ubi_num is %UBI_DEV_NUM_AUTO, in
@@ -849,7 +849,8 @@ static int autoresize(struct ubi_device *ubi, int vol_id)* Note, the invocations of this function has to be serialized by the * @ubi_devices_mutex. */ -int ubi_attach_mtd_dev (struct mtd_info *mtd,int ubi_num,int vid_hdr_offset) +int ubi_attach_mtd_dev (struct mtd_info *mtd,int ubi_num, +int vid_hdr_offset,int max_beb_per1024) {struct ubi_device *ubi;int i, err, ref =0 ;
@@ -922,7 +923,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)dbg_msg ("sizeof(struct ubi_ainf_peb) %zu" ,sizeof (struct ubi_ainf_peb ));dbg_msg ("sizeof(struct ubi_wl_entry) %zu" ,sizeof (struct ubi_wl_entry )); - err =io_init (ubi); + err =io_init (ubi, max_beb_per1024);if (err) goto out_free;
@@ -1211,7 +1212,8 @@ static int __init ubi_init(void)mutex_lock (&ubi_devices_mutex); err =ubi_attach_mtd_dev (mtd,UBI_DEV_NUM_AUTO , - p->vid_hdr_offs); + p->vid_hdr_offs, +CONFIG_MTD_UBI_BEB_LIMIT );mutex_unlock (&ubi_devices_mutex);if (err <0 ) {ubi_err ("cannot attach mtd%d" , mtd->index);
drivers/mtd/ubi/cdev.c +2 -1
@@ -1010,7 +1010,8 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,* 'ubi_attach_mtd_dev()'. */ mutex_lock (&ubi_devices_mutex); - err =ubi_attach_mtd_dev (mtd, req.ubi_num, req.vid_hdr_offset); + err =ubi_attach_mtd_dev (mtd, req.ubi_num, req.vid_hdr_offset, +CONFIG_MTD_UBI_BEB_LIMIT );mutex_unlock (&ubi_devices_mutex);if (err <0 )put_mtd_device (mtd);
drivers/mtd/ubi/ubi.h +2 -1
@@ -693,7 +693,8 @@ int ubi_io_write_vid_hdr(struct ubi_device *ubi, int pnum, struct ubi_vid_hdr *vid_hdr);/* build.c */ -int ubi_attach_mtd_dev (struct mtd_info *mtd,int ubi_num,int vid_hdr_offset); +int ubi_attach_mtd_dev (struct mtd_info *mtd,int ubi_num, +int vid_hdr_offset,int max_beb_per1024);int ubi_detach_mtd_dev (int ubi_num,int anyway);struct ubi_device *ubi_get_device (int ubi_num);void ubi_put_device (struct ubi_device *ubi);
Signature · 1 line
1.7.2.5
Re: [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition
Quoted 6 lines · Richard Genoud
This patch prepare the way for the addition of
max_beb_per1024module parameter.
There's no functional change.Signed-off-by Richard Genoud <[email protected]>Reviewed-by Shmulik Ladkani <[email protected]>
Pushed with a minor amendment, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH v3 2/6 UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
In reply to Richard GenoudThere's no reason to limit MTD_UBI_BEB_LIMIT to 256 (25%), let's set it to 768 (75%) this should be enough.
And the lower bound can be 0, no reason to forbid it (even if it will be reserved for test purpose only I guess).
--- drivers/mtd/ubi/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/ubi/Kconfig +1 -1
@@ -30,7 +30,7 @@ config MTD_UBI_WL_THRESHOLD config MTD_UBI_BEB_LIMIT int "Maximum expected bad eraseblock count per 1024 eraseblocks" default 20 - range 1 256 + range 0 768 help This option specifies the maximum bad physical eraseblocks UBI expects on the MTD device (per 1024 eraseblocks). If the underlying
Signature · 1 line
1.7.2.5
Re: [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
Quoted 6 lines · Richard Genoud
There's no reason to limit
MTD_UBI_BEB_LIMITto 256 (25%), let's set it to 768 (75%) this should be enough.
And the lower bound can be 0, no reason to forbid it (even if it will be reserved for test purpose only I guess).Signed-off-by Richard Genoud <[email protected]>
I've folded this patch into
"UBI: use the whole MTD device size to get bad_peb_limit" instead. Yes, I know that value 0 is not handled at that point, but I think it is not a big problem (AKA good enough). Certainly not worth a separate patch.
Thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH v3 3/6 UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
In reply to Richard Genoudmax_beb_per1024 shouldn't be negative, and a 0 value will be treated as the default value.
For the upper bound, 768/1024 should be enough.
--- drivers/mtd/ubi/build.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
drivers/mtd/ubi/build.c +12 -0
@@ -49,6 +49,9 @@/* Maximum number of comma-separated items in the 'mtd=' parameter */ #define MTD_PARAM_MAX_COUNT 2 +/* Maximum value for the number of bad eraseblocks per 1024 limit */ +#define MAX_MTD_UBI_BEB_LIMIT 768 +#ifdef CONFIG_MTD_UBI_MODULE #define ubi_is_module () 1#else
@@ -855,6 +858,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,struct ubi_device *ubi;int i, err, ref =0 ; +if ((max_beb_per1024 <0 ) || (max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT )) +return -EINVAL ; + +/* +* Use the default value if max_beb_per1024 isn't provided. +*/ +if (!max_beb_per1024) + max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; +/* * Check if we already have the same MTD device attached. *
Signature · 1 line
1.7.2.5
Re: [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
drivers/mtd/ubi/build.c int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, · line 862
Quoted 6 lines · Richard Genoud
drivers/mtd/ubi/build.c +2
-0@@ -855,6 +858,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,struct ubi_device *ubi;int i, err, ref =0 ; +if ((max_beb_per1024 <0 ) || (max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT )) +return -EINVAL ;
Removed excessive brackets and pushed to linux-ubi, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH v3 4/6 UBI: replace MTD_UBI_BEB_LIMIT with module parameter
In reply to Richard GenoudThis patch provides the possibility to adjust the "maximum expected number of bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device.
The majority of NAND devices have their max_beb_per1024 equal to 20, but sometimes it's more.
Now, we can adjust that via a kernel parameter:
ubi.mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]]
--- drivers/mtd/ubi/Kconfig | 2 ++ drivers/mtd/ubi/build.c | 38 ++++++++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-)
drivers/mtd/ubi/Kconfig +2 -0
@@ -51,6 +51,8 @@ config MTD_UBI_BEB_LIMIT MTD partitions of the same size, UBI will reserve 40 eraseblocks when attaching a partition. + This option can be overridden by the kernel parameter ubi.mtd. + Leave the default value if unsure. config MTD_UBI_GLUEBI
drivers/mtd/ubi/build.c +24 -14
@@ -47,7 +47,7 @@#define MTD_PARAM_LEN_MAX 64/* Maximum number of comma-separated items in the 'mtd=' parameter */ -#define MTD_PARAM_MAX_COUNT 2 +#define MTD_PARAM_MAX_COUNT 3/* Maximum value for the number of bad eraseblocks per 1024 limit */ #define MAX_MTD_UBI_BEB_LIMIT 768
@@ -63,10 +63,12 @@* @name: MTD character device node path, MTD device name, or MTD device number * string * @vid_hdr_offs: VID header offset +* @max_beb_per1024: maximum expected number of bad blocks per 1024 erase blocks */ struct mtd_dev_param {char name[MTD_PARAM_LEN_MAX ];int vid_hdr_offs; +int max_beb_per1024; };/* Numbers of elements set in the @mtd_dev_param array */
@@ -1224,8 +1226,7 @@ static int __init ubi_init(void)mutex_lock (&ubi_devices_mutex); err =ubi_attach_mtd_dev (mtd,UBI_DEV_NUM_AUTO , - p->vid_hdr_offs, -CONFIG_MTD_UBI_BEB_LIMIT ); + p->vid_hdr_offs, p->max_beb_per1024);mutex_unlock (&ubi_devices_mutex);if (err <0 ) {ubi_err ("cannot attach mtd%d" , mtd->index);
@@ -1345,6 +1346,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)char buf[MTD_PARAM_LEN_MAX ];char *pbuf = &buf[0 ];char *tokens[MTD_PARAM_MAX_COUNT ]; +int err;if (!val)return -EINVAL ;
@@ -1392,23 +1394,31 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)if (p->vid_hdr_offs <0 )return p->vid_hdr_offs; +if (tokens[2 ]) { + err =kstrtoint (tokens[2 ],10 , &p->max_beb_per1024); +if (err) { +pr_err ("UBI error: bad value for max_beb_per1024 parameter: %s" , + tokens[2 ]); +return -EINVAL ; + } + } + mtd_devs +=1 ;return 0 ; }module_param_call (mtd, ubi_mtd_param_parse,NULL ,NULL ,000 ); -MODULE_PARM_DESC (mtd,"MTD devices to attach. Parameter format: " -"mtd=<name|num|path>[,<vid_hdr_offs>].\n" +MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]].\n" "Multiple \"mtd\" parameters may be specified.\n" -"MTD devices may be specified by their number, name, or " -"path to the MTD character device node.\n" -"Optional \"vid_hdr_offs\" parameter specifies UBI VID " -"header position to be used by UBI.\n" -"Example 1: mtd=/dev/mtd0 - attach MTD device " -"/dev/mtd0.\n" -"Example 2: mtd=content,1984 mtd=4 - attach MTD device " -"with name \"content\" using VID header offset 1984, and " -"MTD device number 4 with default VID header offset." ); + "MTD devices may be specified by their number, name, or path to the MTD character device node.\n" + "Optional \"vid_hdr_offs\" parameter specifies UBI VID header position to be used by UBI. (default value if 0)\n" + "Optional \"max_beb_per1024\" parameter specifies the maximum expected bad eraseblock per 1024 eraseblocks. (default value (" + __stringify(CONFIG_MTD_UBI_BEB_LIMIT) ") if 0)\n" +"\n" +"Example 1: mtd=/dev/mtd0 - attach MTD device /dev/mtd0.\n" +"Example 2: mtd=content,1984 mtd=4 - attach MTD device with name \"content\" using VID header offset 1984, and MTD device number 4 with default VID header offset.\n" +"Example 3: mtd=/dev/mtd1,0,25 - attach MTD device /dev/mtd1 using default VID header offset and reserve 25*nand_size_in_blocks/1024 erase blocks for bad block handling.\n" +"\t(e.g. if the NAND *chipset* has 4096 PEB, 100 will be reserved for this UBI device)." );MODULE_VERSION (__stringify (UBI_VERSION ));MODULE_DESCRIPTION ("UBI - Unsorted Block Images" );
Signature · 1 line
1.7.2.5
Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
Amended the commit subject,
Quoted 9 lines · Richard Genoud
This patch provides the possibility to adjust the "maximum expected number of bad blocks per 1024 blocks" (
max_beb_per1024) for each mtd device.The majority of NAND devices have their
max_beb_per1024equal to 20, but sometimes it's more.
Now, we can adjust that via a kernel parameter:
ubi.mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]]Signed-off-by Richard Genoud <[email protected]>
Did few minor amendments and applied this one. And pushed out.
drivers/mtd/ubi/build.c static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) · line 1401
Quoted 2 lines
drivers/mtd/ubi/build.c +2
-0+pr_err ("UBI error: bad value for max_beb_per1024 parameter: %s" , + tokens[2 ]);
Changed this to 'printk(KERN_ERR' and wrapped the line.
The former is because the entire function uses 'printk(KERN_ERR', and I am a fan of consistency. We can change them all to 'pr_err()' and 'pr_warn()' in a separate patch.
Similar for wrapping - UBI wraps all messages. If we want, we can unwrap them all in a separate patch.
Feel free to submit such a patch, I won't have objections.
drivers/mtd/ubi/build.c static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) · line 1401
Quoted 2 lines
drivers/mtd/ubi/build.c +0
-2-MODULE_PARM_DESC (mtd,"MTD devices to attach. Parameter format: " - "mtd=<name|num|path>[,<vid_hdr_offs>].\n"
You unwrapped this one and I pushed that as is, because it is just much more readable, and it is the only place where we describe a module, so no inconsistencies. :-)
Thank you!
Signature · 2 lines
Best Regards, Artem Bityutskiy
Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
2012/8/21 Artem Bityutskiy <[email protected]>:
Quoted 18 lines
Changed this to 'printk(KERN_ERR' and wrapped the line.
The former is because the entire function uses 'printk(KERN_ERR', and I am a fan of consistency. We can change them all to '
pr_err()' and 'pr_warn()' in a separate patch.Similar for wrapping - UBI wraps all messages. If we want, we can unwrap them all in a separate patch.
Feel free to submit such a patch, I won't have objections.
drivers/mtd/ubi/build.c static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) · line 1401
Quoted 2 lines
drivers/mtd/ubi/build.c +0
-2-MODULE_PARM_DESC (mtd,"MTD devices to attach. Parameter format: " - "mtd=<name|num|path>[,<vid_hdr_offs>].\n"You unwrapped this one and I pushed that as is, because it is just much more readable, and it is the only place where we describe a module, so no inconsistencies. :-)
Quoted 5 lines
Thank you!
--
Best Regards,
Artem Bityutskiy
Looking for consistency, I made a quick git grep "\<printk( *KERN_" | wc -l the answer is > 32000
Looks like I found something to do if I'm getting bored with openstreetmap :)
I double checked linux-ubi/master tree with mine, it's all right.
I'll resend the mtd-utils part updated with the new kernel header ubi-user.h
Best regards
Richard.
Signature · 1 line
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?
Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
Quoted 5 lines · Richard Genoud
Looking for consistency, I made a quick git grep "\<printk(
*KERN_" | wc -l
the answer is > 32000
Looks like I found something to do if I'm getting bored with openstreetmap :)
Well, now I am talking about consistency within UBI only, withing the project. I think that function is the only one which uses plain printk in UBI. I do not remember the details, but there were some issues using the UBI wrappers like 'ubi_msg' in this function because it is called very early during boot time (when UBI is compiled-in). And I just did not know about pr_err() that time, or pr_err() did not exist. So you can just amend this single function if you wish.
Quoted 1 line
Signature · 2 lines
Best Regards, Artem Bityutskiy
Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
2012/8/22 Artem Bityutskiy <[email protected]>:
Quoted 7 lines
Well, now I am talking about consistency within UBI only, withing the project. I think that function is the only one which uses plain printk in UBI. I do not remember the details, but there were some issues using the UBI wrappers like '
ubi_msg' in this function because it is called very early during boot time (when UBI is compiled-in). And I just did not know aboutpr_err()that time, orpr_err()did not exist. So you can just amend this single function if you wish.
(for the record, pr_err didn't exists at the time UBI got into the kernel) I tested this function with pr_err and ubi_err, and both are working. (by using ubi.mtd= ubi.mtd=2,0,toto ubi.mtd=1,2,3,4)
It should be better to use ubi_err don't you think ?
(or I missed a corner case ?)
Richard.
Signature · 1 line
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?
Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
Quoted 9 lines · Richard Genoud
2012/8/22 Artem Bityutskiy <[email protected]>:
Quoted 7 lines
Well, now I am talking about consistency within UBI only, withing the project. I think that function is the only one which uses plain printk in UBI. I do not remember the details, but there were some issues using the UBI wrappers like '
ubi_msg' in this function because it is called very early during boot time (when UBI is compiled-in). And I just did not know aboutpr_err()that time, orpr_err()did not exist. So you can just amend this single function if you wish.
Quoted 5 lines
(for the record,
pr_errdidn't exists at the time UBI got into the kernel) I tested this function withpr_errandubi_err, and both are working. (by using ubi.mtd= ubi.mtd=2,0,toto ubi.mtd=1,2,3,4)
It should be better to useubi_errdon't you think ?
(or I missed a corner case ?)
I guess it is safe to change than, thank you!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH v3 5/6 UBI: add ioctl for max_beb_per1024
In reply to Richard GenoudThis patch provides the possibility to adjust the "maximum expected number of bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device from UBI_IOCATT ioctl.
The majority of NAND devices have their max_beb_per1024 equal to 20, but sometimes it's more.
We already could adjust that via a kernel parameter, now we can also use UBI_IOCATT ioctl:
struct ubi_attach_req {
__s32 ubi_num;
__s32 mtd_num;
__s32 vid_hdr_offset;
__u16 max_beb_per1024;
__s8 padding[10];
};--- drivers/mtd/ubi/Kconfig | 3 ++- drivers/mtd/ubi/build.c | 2 ++ drivers/mtd/ubi/cdev.c | 2 +- include/mtd/ubi-user.h | 19 ++++++++++++++++++- 4 files changed, 23 insertions(+), 3 deletions(-)
drivers/mtd/ubi/Kconfig +2 -1
@@ -51,7 +51,8 @@ config MTD_UBI_BEB_LIMIT MTD partitions of the same size, UBI will reserve 40 eraseblocks when attaching a partition. - This option can be overridden by the kernel parameter ubi.mtd. + This option can be overridden by the kernel parameter ubi.mtd and the + ioctl UBI_IOCATT. Leave the default value if unsure.
drivers/mtd/ubi/build.c +2 -0
@@ -865,6 +865,8 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,/* * Use the default value if max_beb_per1024 isn't provided. +* This way, we are keeping the same behaviour between the UBI_IOCATT +* ioctl and the module parameter. */ if (!max_beb_per1024) max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ;
drivers/mtd/ubi/cdev.c +1 -1
@@ -1011,7 +1011,7 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,*/ mutex_lock (&ubi_devices_mutex); err =ubi_attach_mtd_dev (mtd, req.ubi_num, req.vid_hdr_offset, -CONFIG_MTD_UBI_BEB_LIMIT ); + req.max_beb_per1024);mutex_unlock (&ubi_devices_mutex);if (err <0 )put_mtd_device (mtd);
include/mtd/ubi-user.h +18 -1
@@ -222,6 +222,7 @@ enum {* @ubi_num: UBI device number to create * @mtd_num: MTD device number to attach * @vid_hdr_offset: VID header offset (use defaults if %0) +* @max_beb_per1024: Maximum expected bad eraseblocks per 1024 eraseblocks * @padding: reserved for future, not used, has to be zeroed * * This data structure is used to specify MTD device UBI has to attach and the
@@ -245,12 +246,28 @@ enum {* be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes * aligned, which is OK, as UBI is clever enough to realize this is 4th * sub-page of the first page and add needed padding. +* +* The @max_beb_per1024 is the maximum bad eraseblocks UBI expects on the ubi +* device per 1024 eraseblocks. +* This value is often given in an other form in the NAND datasheet (min NVB +* i.e. minimal number of valid blocks). The maximum expected bad eraseblocks +* per 1024 is then: +* 1024 * (1 - MinNVB / MaxNVB) +* Which gives 20 for most NAND devices. +* This limit is used in order to derive amount of eraseblock UBI reserves for +* handling new bad blocks. +* If the device has more bad eraseblocks than this limit, UBI does not reserve +* any physical eraseblocks for new bad eraseblocks, but attempts to use +* available eraseblocks (if any). +* The accepted range is 0-768. If 0 is given, the default kernel value will be +* used for compatibility. */ struct ubi_attach_req {__s32 ubi_num;__s32 mtd_num;__s32 vid_hdr_offset; -__s8 padding[12 ]; +__u16 max_beb_per1024; +__s8 padding[10 ]; };/**
Signature · 1 line
1.7.2.5
Re: [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024
Quoted 3 lines · Richard Genoud
This patch provides the possibility to adjust the "maximum expected number of bad blocks per 1024 blocks" (
max_beb_per1024) for each mtd device fromUBI_IOCATTioctl.
Thanks, pushed to linux-ubi.git with minor amendments.
include/mtd/ubi-user.h enum { · line 271
Quoted 8 lines
struct
ubi_attach_req{include/mtd/ubi-user.h +2
-1__s32 ubi_num;__s32 mtd_num;__s32 vid_hdr_offset; -__s8 padding[12 ]; +__u16 max_beb_per1024; +__s8 padding[10 ]; };
I've made that to be _s16, for consistency. AFAIR, the reasons I used signed types all over the place (unless the really needed an unsigned type) are:
1. Easy to write functions with return a positive resulting value of something (e.g., pnum) in case of success and a negative error code in case of failure.
2. Easy to check for sane value by just comparing to 0.
But these are not very strong arguments, and I read somewhere that some CPUs handle unsigned integers a bit faster, not sure what architectures was that about.
Thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
PATCH v3 6/6 UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
In reply to Richard GenoudThis option can be set by a kernel parameter and an ioctl, so we may not need the kernel config option any more.
--- arch/arm/configs/sam9_l9260_defconfig | 1 - drivers/mtd/ubi/Kconfig | 29 ----------------------------- drivers/mtd/ubi/build.c | 4 ++-- drivers/mtd/ubi/ubi.h | 3 +++ 4 files changed, 5 insertions(+), 32 deletions(-)
arch/arm/configs/sam9_l9260_defconfig +0 -1
@@ -39,7 +39,6 @@ CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ATMEL=y CONFIG_MTD_NAND_PLATFORM=y CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=25 CONFIG_MTD_UBI_GLUEBI=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y
drivers/mtd/ubi/Kconfig +0 -29
@@ -27,35 +27,6 @@ config MTD_UBI_WL_THRESHOLD life-cycle less than 10000, the threshold should be lessened (e.g., to 128 or 256, although it does not have to be power of 2). -config MTD_UBI_BEB_LIMIT - int "Maximum expected bad eraseblock count per 1024 eraseblocks" - default 20 - range 0 768 - help - This option specifies the maximum bad physical eraseblocks UBI - expects on the MTD device (per 1024 eraseblocks). If the underlying - flash does not admit of bad eraseblocks (e.g. NOR flash), this value - is ignored. - - NAND datasheets often specify the minimum and maximum NVM (Number of - Valid Blocks) for the flashes' endurance lifetime. The maximum - expected bad eraseblocks per 1024 eraseblocks then can be calculated - as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs - (MaxNVB is basically the total count of eraseblocks on the chip). - - To put it differently, if this value is 20, UBI will try to reserve - about 1.9% of physical eraseblocks for bad blocks handling. And that - will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD - partition UBI attaches. This means that if you have, say, a NAND - flash chip admits maximum 40 bad eraseblocks, and it is split on two - MTD partitions of the same size, UBI will reserve 40 eraseblocks when - attaching a partition. - - This option can be overridden by the kernel parameter ubi.mtd and the - ioctl UBI_IOCATT. - - Leave the default value if unsure. - config MTD_UBI_GLUEBI tristate "MTD devices emulation driver (gluebi)" help
drivers/mtd/ubi/build.c +2 -2
@@ -869,7 +869,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,* ioctl and the module parameter. */ if (!max_beb_per1024) - max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; + max_beb_per1024 =MTD_UBI_DEFAULT_BEB_LIMIT ;/* * Check if we already have the same MTD device attached.
@@ -1415,7 +1415,7 @@ MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=<name|num|pa"MTD devices may be specified by their number, name, or path to the MTD character device node.\n" "Optional \"vid_hdr_offs\" parameter specifies UBI VID header position to be used by UBI. (default value if 0)\n" "Optional \"max_beb_per1024\" parameter specifies the maximum expected bad eraseblock per 1024 eraseblocks. (default value (" - __stringify(CONFIG_MTD_UBI_BEB_LIMIT) ") if 0)\n" + __stringify(MTD_UBI_DEFAULT_BEB_LIMIT) ") if 0)\n""\n" "Example 1: mtd=/dev/mtd0 - attach MTD device /dev/mtd0.\n" "Example 2: mtd=content,1984 mtd=4 - attach MTD device with name \"content\" using VID header offset 1984, and MTD device number 4 with default VID header offset.\n"
drivers/mtd/ubi/ubi.h +3 -0
@@ -50,6 +50,9 @@/* UBI name used for character devices, sysfs, etc */ #define UBI_NAME_STR "ubi" +/* Default number of maximum expected bad blocks per 1024 eraseblocks */ +#define MTD_UBI_DEFAULT_BEB_LIMIT 20 +/* Normal UBI messages */ #define ubi_msg (fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)/* UBI warning messages */
Signature · 1 line
1.7.2.5
Re: [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
Quoted 4 lines · Richard Genoud
This option can be set by a kernel parameter and an ioctl, so we may not need the kernel config option any more.
Signed-off-by Richard Genoud <[email protected]>
Thanks for separating this. Actually, I've given some more thoughts, and changed my mind :-) Shmulik is right, it is nicer to preserve the Kconfig option. So let's drop this patch.
AFAICS, all the kernel stuff is in my tree now.
Signature · 2 lines
Best Regards, Artem Bityutskiy
Quoted 5 lines · Richard Genoud
This patch serie introduce, step by step the kernel module parameter
max_beb_per1024, then the ioctl and finally drop the kernel config optionCONFIG_MTD_UBI_BEB_LIMIT.It's based on top of linux-ubi/master (4ebb4b5)
I've also pushed this patch:
From 5fe236c703063f9bc87b66c593408a0d48bbe0e7 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash
If the flash does not admit of bad blocks (e.g., NOR) - disallow using 'max_beb_per1024'.
--- drivers/mtd/ubi/build.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/mtd/ubi/build.c +9 -3
@@ -860,9 +860,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,if (max_beb_per1024 <0 || max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT )return -EINVAL ; -if (!max_beb_per1024) - max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; -/* * Check if we already have the same MTD device attached. *
@@ -935,6 +932,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,if (err) goto out_free; +if (!max_beb_per1024) { +if (!ubi->bad_allowed) { +ubi_err ("mtd%d does not admit of bad blocks, " +"max_beb_per1024 cannot be used" , mtd->index); + goto out_free; + } + max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; + } + err = -ENOMEM ; ubi->peb_buf =vmalloc (ubi->peb_size);if (!ubi->peb_buf)
Signature · 10 lines
1.7.10.4 Are you OK with this? Now that we seem to have everything in, would you please give this all a final test. Could you please check both on nandsim and mtdram? -- Best Regards, Artem Bityutskiy
Quoted 17 lines · On Thu, 23 Aug 2012 13:10:15 +0300 Artem Bityutskiy <[email protected]> wrote:
drivers/mtd/ubi/build.c +0
-3@@ -860,9 +860,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,if (max_beb_per1024 <0 || max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT )return -EINVAL ; -if (!max_beb_per1024) - max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; -/* * Check if we already have the same MTD device attached. * @@ -935,6 +932,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,if (err) goto out_free;
drivers/mtd/ubi/build.c int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, · line 943
Quoted 10 lines
drivers/mtd/ubi/build.c +9
-0+if (!max_beb_per1024) { +if (!ubi->bad_allowed) { +ubi_err ("mtd%d does not admit of bad blocks, " +"max_beb_per1024 cannot be used" , mtd->index); + goto out_free; + } + max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; + } +
Artem, this is now located *after* the call to
io_init(ubi, max_beb_per1024)
So falling to the default (in case max_beb_per1024 is zero) won't work.
Also, why displaying the error if max_beb_per1024 was NOT povided? Shouldn't it be displayed only when max_beb_per1024 is other than zero? What am I missing?
Regards,
Shmulik
2012/8/23 Shmulik Ladkani <[email protected]>:
Quoted 7 lines
Artem, this is now located *after* the call to
io_init(ubi, max_beb_per1024)So falling to the default (in case
max_beb_per1024is zero) won't work.Also, why displaying the error if
max_beb_per1024was NOT povided? Shouldn't it be displayed only whenmax_beb_per1024is other than zero? What am I missing?
+1
mounting NOR flash without the max_beb_per1024 will fail, that's really not what we want.
Regards,
Richard.
Signature · 1 line
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?
From fa7595564e95672ab87d4a910c6bc02123b75e88 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash
If the flash does not admit of bad blocks (e.g., NOR) - disallow using 'max_beb_per1024'.
---
Second attempt, did not test :-)
drivers/mtd/ubi/build.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/mtd/ubi/build.c +11 -7
@@ -646,8 +646,18 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024) ubi->flash_size = ubi->mtd->size;if (mtd_can_have_bb (ubi->mtd)) { - ubi->bad_allowed =1 ; +if (max_beb_per1024 <0 || + max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT ) +return -EINVAL ; +if (!max_beb_per1024) + max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; + ubi->bad_peb_limit =get_bad_peb_limit (ubi, max_beb_per1024); + ubi->bad_allowed =1 ; + }else if (max_beb_per1024) { +ubi_err ("mtd%d does not admit of bad blocks, max_beb_per1024 " +"cannot be used" , mtd->index); +return -EINVAL ; }if (ubi->mtd->type ==MTD_NORFLASH ) {
@@ -857,12 +867,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,struct ubi_device *ubi;int i, err, ref =0 ; -if (max_beb_per1024 <0 || max_beb_per1024 >MAX_MTD_UBI_BEB_LIMIT ) -return -EINVAL ; - -if (!max_beb_per1024) - max_beb_per1024 =CONFIG_MTD_UBI_BEB_LIMIT ; -/* * Check if we already have the same MTD device attached. *
Signature · 1 line
1.7.10.4
Shmulik Ladkani
Reviewed-byHi,
Quoted 5 lines · On Thu, 23 Aug 2012 15:30:30 +0300 Artem Bityutskiy <[email protected]> wrote:
From
fa7595564e95672ab87d4a910c6bc02123b75e88Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallowmax_beb_per1024on NOR flash
Quoted 7 lines
If the flash does not admit of bad blocks (e.g., NOR) - disallow using '
max_beb_per1024'.Signed-off-by Artem Bityutskiy <[email protected]>---
Second attempt, did not test :-)
Looks ok to me.
Quoted 11 lines · Shmulik Ladkani
Hi,
Quoted 8 lines · On Thu, 23 Aug 2012 15:30:30 +0300 Artem Bityutskiy <[email protected]> wrote:
From
fa7595564e95672ab87d4a910c6bc02123b75e88Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallowmax_beb_per1024on NOR flashIf the flash does not admit of bad blocks (e.g., NOR) - disallow using '
max_beb_per1024'.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Artem Bityutskiy <[email protected]>---
Second attempt, did not test :-)
Looks ok to me.
Reviewed-by Shmulik Ladkani <[email protected]>
Thanks, it is pushed now. The further things we'd need to do are:
1. Somewhat test what we ended up with.
2. Write some documentation.
3. Search for UBI users in the mtd mailing list and send them an e-mail with heads-up, to make sure people have a possibility to complain before this stuff is merged.
I can do number 3 :-)
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/8/23 Artem Bityutskiy <[email protected]>:
Quoted 9 lines
Thanks, it is pushed now. The further things we'd need to do are:
1. Somewhat test what we ended up with.
2. Write some documentation.
3. Search for UBI users in the mtd mailing list and send them an e-mail with heads-up, to make sure people have a possibility to complain before this stuff is merged.I can do number 3 :-)
I could do some more tests with the final version.
I guess that the documentation to update is there:
http://www.linux-mtd.infradead.org/doc/ubi.html
The message commit of dccaefbd68ce0c4d83f1d57667726868bdc03cce (UBI:
use the whole MTD device size to get bad_peb_limit)
could be a start for the "Why?"
Signature · 1 line
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?
Quoted 1 line · Richard Genoud
I could do some more tests with the final version.
Thanks!
Quoted 2 lines
I guess that the documentation to update is there:
http://www.linux-mtd.infradead.org/doc/ubi.html
Yes, a separate section about how UBI reserves eraseblocks for bad PEBs handling is needed.
Quoted 3 lines
The message commit of
dccaefbd68ce0c4d83f1d57667726868bdc03cce(UBI:
use the whole MTD device size to getbad_peb_limit)
could be a start for the "Why?"
Sure.
Additionally, all places where we mention 2% should be amended correspondingly. I guess this commit can be used to locate the places:
http://git.infradead.org/mtd-www.git/commit/2b91234cf1dd9968d18679b19d7dbe22b6508cff
Also, this section should be amended:
http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/8/23 Richard Genoud <[email protected]>:
Quoted 1 line
I could do some more tests with the final version.
I did some test:
- new ubiattacht/detach with old kernel
- old ubiattacht/detach/mkvol/format/ ubifs mount with new kernel
- new ubi* with new kernel.
- command line ubi.mtd=...
I ran into the case where I asked for 20 PEB reserved for bad PEB handling:
UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 10, need 20
and I did a ubirmvol on a small volume:
# ubirmvol /dev/ubi0 -N toto2 UBI: reserved more 10 PEBs for bad PEB handling => that's great, no need to detach and then re-attach
I tested also some values at limits, it seems all right.
BUT, I ran into a bug, I don't know if it's my kernel (as I've got quite a lot of patches ahead of 3.6 to get my board run), but it's kind of nasty.
It's not related to this patch serie, I could trigger it with a 3.6-rc1 kernel (and my board-patches).
I get some memory crashing when I do :flash_erase /dev/mtd2 0 160 (it's a whole mtd partition) ubiattach -m 2
After that, I can have a OOPS right away, but sometimes not. but if I run someting (top for exemple) I get an oops then. So, the memory is beeing corrupted somewhere, but I couldn't find out exactly where.
But I found that if I comment out the lines :
drivers/mtd/ubi/vtbl.c +2 -0
@@ -346,8 +346,8 @@ retry:*/ err =ubi_scan_add_used (ubi, si, new_seb->pnum, new_seb->ec, vid_hdr,0 ); +// kfree(new_seb); +// ubi_free_vid_hdr(ubi, vid_hdr); return err; write_error:
I can't trigger an oops any more.
As I can't test with older kernel, I reverted some commits that touched drivers/mtd/ubi
I reverted all commits from 3.6-rc1 to 4415626732defb5a4567a0a757c7c5baae7ca846 (UBI: amend commentaries WRT dtype)
and I still can trigger the oops.
Does someone can reproduce that ?
Best regards,
Richard
Quoted 3 lines · Richard Genoud
BUT, I ran into a bug, I don't know if it's my kernel (as I've got quite a lot of patches ahead of 3.6 to get my board run), but it's kind of nasty.
What is your kernel? Why don't you just pull the corresponding ubifs backport tree?
Quoted 5 lines
It's not related to this patch serie, I could trigger it with a 3.6-rc1 kernel (and my board-patches).
I get some memory crashing when I do :flash_erase/dev/mtd20 160 (it's a whole mtd partition) ubiattach -m 2
Would you please be able to reproduce this with linux-ubi tree and also send be the full oops?
Quoted 4 lines
After that, I can have a OOPS right away, but sometimes not. but if I run someting (top for exemple) I get an oops then. So, the memory is beeing corrupted somewhere, but I couldn't find out exactly where.
If you could somehow reproduce this with nandsim, it would make it easy for me to find the bug.
drivers/mtd/ubi/vtbl.c retry: · line 348
Quoted 8 lines
But I found that if I comment out the lines :
drivers/mtd/ubi/vtbl.c +0
-0@@ -346,8 +346,8 @@ retry:*/ err =ubi_scan_add_used (ubi, si, new_seb->pnum, new_seb->ec, vid_hdr,0 );
We renamed all scan functions recently, so AFAICS you are not using the latest UBI code-base. How about picking the latest back-port tree?
drivers/mtd/ubi/vtbl.c retry: · line 350
Quoted 2 lines
drivers/mtd/ubi/vtbl.c +2
-0+// kfree(new_seb); +// ubi_free_vid_hdr(ubi, vid_hdr);
This is strange, I think these 2 frees are all-right, I think the root-cause is somewhere else.
Quoted 1 line
Does someone can reproduce that ?
It is difficult to say because you did not send the full oops.
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/9/3 Artem Bityutskiy <[email protected]>:
Quoted 7 lines · Richard Genoud
Quoted 3 lines
BUT, I ran into a bug, I don't know if it's my kernel (as I've got quite a lot of patches ahead of 3.6 to get my board run), but it's kind of nasty.
What is your kernel? Why don't you just pull the corresponding ubifs backport tree?
I'm on 3.6-rc1 + specific work for my board (pinctrl, device tree and some driver stuff) without which I can't boot
Quoted 2 lines
Would you please be able to reproduce this with linux-ubi tree and also send be the full oops?
I rebased my work onto linux-ubi/master, I enabled only the needed options to boot and test.
[ 12.500000] UBI: attaching mtd3 to ubi0 [ 12.539062] UBI: scanning is finished [ 12.539062] UBI: empty MTD device detected [ 12.562500] ------------[ cut here ]------------ [ 12.562500] kernel BUG at mm/slob.c:331! [ 12.562500] Internal error: Oops - BUG: 0 [#1] ARM [ 12.562500] CPU: 0 Not tainted (3.6.0-rc1+ #887) [ 12.562500] PC is at slob_alloc.clone.18+0x174/0x1b4 [ 12.562500] LR is at slob_page_alloc+0x1a8/0x1d0 [ 12.562500] pc : [<c0068130>] lr : [<c0067c40>] psr: 60000093 [ 12.562500] sp : c7b47e08 ip : 00000000 fp : 01020014 [ 12.562500] r10: 00000000 r9 : a0000013 r8 : 00007b69 [ 12.562500] r7 : c0321000 r6 : 00000030 r5 : c0417d20 r4 : c02e1908 [ 12.562500] r3 : 01020014 r2 : 01020013 r1 : fefdffec r0 : 00000000 [ 12.562500] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 12.562500] Control: 0005317f Table: 27b48000 DAC: 00000015 [ 12.562500] Process ubiattach (pid: 354, stack limit = 0xc7b46270) [ 12.562500] Stack: (0xc7b47e08 to 0xc7b48000) [ 12.562500] 7e00: 00000030 000000d0 01020014 c7add1e0 c7b6a0f4 00000000 [ 12.562500] 7e20: c7b6a0a0 c7add2a0 00000001 00000001 c7b6a0f0 c0068374 00000000 c7b67020 [ 12.562500] 7e40: c7b6a0f4 c01798c0 00005800 c7ad7540 c7ad7540 00001000 00000001 00005800 [ 12.562500] 7e60: 00000000 02000200 00000002 00000000 00005800 7fffefff 00000001 c7ad7540 [ 12.562500] 7e80: c7add2a0 c7b67020 c7af79e0 c7ad7540 c7add2a0 01000000 00000000 00000000 [ 12.562500] 7ea0: 00000000 c016c020 c7b67020 00000000 c7ad7540 00000000 00000000 02000000 [ 12.562500] 7ec0: 00000014 c89e6000 000080d2 c7ad7540 c89e6000 c7add2a0 00000000 c89eb6ac [ 12.562500] 7ee0: c7b46000 00000000 00000003 c016cff4 c7ad7540 c7add2a0 00000000 c7a5e820 [ 12.562500] 7f00: 00000014 c017a618 c7ad7540 00000000 00000000 c016fee0 c7aac2f0 c7aa8640 [ 12.562500] 7f20: c7aa24b0 40186f40 40186f40 00000000 be82bb20 c7a5e820 40186f40 00000003 [ 12.562500] 7f40: c0009388 c01703d8 ffffffff 00000003 00000000 00000000 00000000 00000000 [ 12.562500] 7f60: be82bb20 00000003 40186f40 c0078684 c7acb6a0 00000003 40186f40 c7acb6a0 [ 12.562500] 7f80: be82bb20 c00786f4 00000003 00000000 be82bb20 be82bb20 40186f40 00000003 [ 12.562500] 7fa0: 00000036 c0009200 be82bb20 40186f40 00000003 40186f40 be82bb20 00000000 [ 12.562500] 7fc0: be82bb20 40186f40 00000003 00000036 ffffffff 0001442c ffffffff 00000003 [ 12.562500] 7fe0: b6ef5ec4 be82bae0 000098ec b6ef5f08 60000010 00000003 27ffe831 27ffec31 [ 12.562500] [<c0068130>] (slob_alloc.clone.18+0x174/0x1b4) from [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) [ 12.562500] [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) from [<c01798c0>] (ubi_add_to_av+0x318/0x3fc) [ 12.562500] [<c01798c0>] (ubi_add_to_av+0x318/0x3fc) from [<c016c020>] (create_vtbl+0x1cc/0x258) [ 12.562500] [<c016c020>] (create_vtbl+0x1cc/0x258) from [<c016cff4>] (ubi_read_volume_table+0xe0/0x1f0) [ 12.562500] [<c016cff4>] (ubi_read_volume_table+0xe0/0x1f0) from [<c017a618>] (ubi_attach+0x54/0xac) [ 12.562500] [<c017a618>] (ubi_attach+0x54/0xac) from [<c016fee0>] (ubi_attach_mtd_dev+0x1bc/0x474) [ 12.562500] [<c016fee0>] (ubi_attach_mtd_dev+0x1bc/0x474) from [<c01703d8>] (ctrl_cdev_ioctl+0xd8/0x168) [ 12.562500] [<c01703d8>] (ctrl_cdev_ioctl+0xd8/0x168) from [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) [ 12.562500] [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) from [<c00786f4>] (sys_ioctl+0x34/0x54) [ 12.562500] [<c00786f4>] (sys_ioctl+0x34/0x54) from [<c0009200>] (ret_fast_syscall+0x0/0x2c) [ 12.562500] Code: e1a0200b ebfffe5b e250a000 1a000000 (e7f001f2) [ 12.562500] ---[ end trace 473f0aad0098fe9c ]---
Quoted 8 lines
Quoted 5 lines
After that, I can have a OOPS right away, but sometimes not. but if I run someting (top for exemple) I get an oops then. So, the memory is beeing corrupted somewhere, but I couldn't find out exactly where.
If you could somehow reproduce this with nandsim, it would make it easy for me to find the bug.
here it is:
[ 0.921875] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.929687] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.937500] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.953125] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.960937] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.968750] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.976562] NAND device: Manufacturer ID: 0x98, Chip ID: 0x39 (Toshiba NAND 128MiB 1,8V 8-bit), page size: 512, OOB size: 16 [ 0.992187] flash size: 128 MiB [ 0.992187] page size: 512 bytes [ 0.992187] OOB area size: 16 bytes [ 1.000000] sector size: 16 KiB [ 1.000000] pages number: 262144 [ 1.007812] pages per sector: 32 [ 1.007812] bus width: 8 [ 1.007812] bits in sector size: 14 [ 1.015625] bits in page size: 9 [ 1.015625] bits in OOB size: 4 [ 1.023437] flash size with OOB: 135168 KiB [ 1.023437] page address bytes: 4 [ 1.031250] sector address bytes: 3 [ 1.031250] options: 0x42 [ 1.039062] Scanning device for bad blocks [ 1.242187] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": [ 1.250000] 0x000000000000-0x000008000000 : "NAND simulator partition 0"
# flash_erase /dev/mtd0 0 8192 Erasing 16 Kibyte @ 7ffc000 -- 100 % complete # ./ubiattach -m 0 [ 152.718750] UBI: attaching mtd0 to ubi0 [ 153.054687] UBI: scanning is finished [ 153.062500] UBI: empty MTD device detected [ 153.078125] Internal error: Oops - undefined instruction: 0 [#1] ARM [ 153.078125] CPU: 0 Not tainted (3.6.0-rc1+ #888) [ 153.078125] PC is at 0xc7aab444 [ 153.078125] LR is at ip_local_out+0x28/0x2c [ 153.078125] pc : [<c7aab444>] lr : [<c01bcab4>] psr: 60000013 [ 153.078125] sp : c7aefa80 ip : 0900800a fp : c02df6fc [ 153.078125] r10: 00000068 r9 : 00000108 r8 : 00000000 [ 153.078125] r7 : c7aefb3c r6 : c7ac17e0 r5 : c7bb3464 r4 : c7bc0280 [ 153.078125] r3 : c7aab308 r2 : 00000525 r1 : 00000000 r0 : c7bc029f [ 153.078125] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 153.078125] Control: 0005317f Table: 27b08000 DAC: 00000017 [ 153.078125] Process klogd (pid: 324, stack limit = 0xc7aee270) [ 153.078125] Stack: (0xc7aefa80 to 0xc7af0000) [ 153.078125] fa80: c7bc0280 c01be694 c7bc0280 c7bb3464 c7ac17e0 c01dbbe0 c7aefa8c c7ac17e0 [ 153.078125] faa0: c7aefc9c c7aefb3c c7bc0280 0900800a 6400800a c01dd420 00000068 00000008 [ 153.078125] fac0: c7aefb5c c7aefb6c 00004040 c7ac17e0 c7ad2780 000000cc 00000060 00000060 [ 153.078125] fae0: 00000000 00000000 c01bdd0c 00000000 c7ac198c 00000011 c7ac17e0 00000068 [ 153.078125] fb00: c7ac17e0 c7ad28a0 00000000 00000068 c7ad28b8 c0191af8 c7ad28a0 c7ac17e0 [ 153.078125] fb20: 00000011 c01db548 00000000 c7ad28a0 c7adb7e4 c01de1c8 0000d203 00000002 [ 153.078125] fb40: 00000001 00000000 02110000 00000000 6400800a 0900800a d2030108 0900800a [ 153.078125] fb60: 00000000 00000000 c02cce00 00000000 c7aefbcc c7aefbb0 00000060 c7aefc9c [ 153.078125] fb80: c7ac17e0 c7ae8960 00000010 00004040 c7aefec8 c01e3bec 00000060 bf000000 [ 153.078125] fba0: c7ac22a0 00000060 c7aefc9c c018e1f8 00000000 00000000 00000000 00000001 [ 153.078125] fbc0: ffffffff 00000000 00000000 00000000 00000000 00000000 c7ae8960 00000000 [ 153.078125] fbe0: 00000000 00000000 00000000 00000000 c7aefc30 00000000 00000000 00000000 [ 153.078125] fc00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 153.078125] fc20: 00000000 00000000 00000000 00000000 00000000 00011200 01ffffff 00000060 [ 153.078125] fc40: c7ac22a0 c02e3208 00000000 c7aefc9c c02e2c50 c004c190 00000000 00000041 [ 153.078125] fc60: c02e2c50 00000000 00000001 00000000 bf000000 c7ac25cc c7aefc9c c7bb5004 [ 153.078125] fc80: c7ac2ac4 c018e4b0 c7ac22a0 c01fc444 00000060 c01fe03c c7ae8ab8 c7ac25cc [ 153.078125] fca0: 00000010 c7aefcb8 00000001 00000000 00000000 00004040 c7bb5004 00000060 [ 153.078125] fcc0: 00000001 c7ac2ac4 00000000 c7ac22a0 00000060 00000001 c7aabec8 c01fc4d8 [ 153.078125] fce0: 00000000 00000000 c7aee000 00011200 c7acb6b8 c7ac2ac0 c7ac25c0 c7bc0200 [ 153.078125] fd00: c7ac2b34 c7ac2b50 00000001 c7aabec8 c7aefec8 c01fc820 00000000 3b9aca00 [ 153.078125] fd20: c7ac25c0 c7ac2ac0 c7bc0200 c01faa90 a40f89aa 00000023 c7bc0200 c7ac2ac0 [ 153.078125] fd40: 00000000 00000000 c7ad0000 c01f8168 c7acb6b8 c01f803c 00000012 c7bc0200 [ 153.078125] fd60: c7bc0238 c01fe95c c7bc0200 c7aefd94 c7aefdd8 c7aab880 c7ad0000 c01f9264 [ 153.078125] fd80: c0229578 c7aefd94 00000000 c01f92c0 ffffffe0 00000000 c7aab880 c7aefdd8 [ 153.078125] fda0: c0229578 00000000 00000000 00000000 00000060 c7aee000 c7aefdd8 c7aab880 [ 153.078125] fdc0: c7acb6b8 c00c46dc c7aefdd8 c7bc0160 c7ac2020 c00c4d24 c02d48a4 c7acb6b8 [ 153.078125] fde0: c7bc0160 00000000 00000020 c7acb7b0 c7bc0160 c7ac2020 c7acb6b0 c00baed4 [ 153.078125] fe00: 00008000 c7acb7b0 c7ac0e38 00000000 00000101 c00b66a4 c7aeff00 c7aefec0 [ 153.078125] fe20: c7aefe84 00000001 c7aab190 00000001 c7ad0000 c0073528 c7aeff00 c7aeff08 [ 153.078125] fe40: c7aeff00 c7aefec0 00000000 00000000 00000000 c7aee000 c7aabec8 c0075048 [ 153.078125] fe60: 0002bbb4 00000002 c7bc00c0 00000000 c7aeff78 00000024 ffffff9c 00000000 [ 153.078125] fe80: 00000000 c7ac0e38 c7bb4000 c7aeff00 c7bc00c0 00000000 c7aee000 00000000 [ 153.078125] fea0: c7aee000 c7aeff78 c7aefec8 c0075588 c7aefec8 00000000 b6ef8990 c02e3208 [ 153.078125] fec0: 00000000 00000000 00000000 00000000 00000000 c7aeff78 00000001 ffffff9c [ 153.078125] fee0: c7aeff00 c7bb4000 c7aee000 00000000 0000000a c00758ec 00000041 c02d2688 [ 153.078125] ff00: c7aab190 c7aabec8 0002bbb4 00000002 c7bb4005 c7802800 c7aab190 c7aa9500 [ 153.078125] ff20: c7ac0e38 00000101 00000000 00000000 00000000 00000000 00000000 c7af1b68 [ 153.078125] ff40: c7af1b60 00000000 00000000 c007fb50 00000000 00000000 00000004 ffffff9c [ 153.078125] ff60: c7bb4000 00000001 c0009388 c00695ac c7aeff90 0000004e 00000000 becd0000 [ 153.078125] ff80: 00000024 00000100 00000000 00000000 b6f04eb0 becd67d0 00000005 c0009388 [ 153.078125] ffa0: 00000000 c0009200 00000000 b6f04eb0 b6ef8990 00000000 00000054 b6f04eb0 [ 153.078125] ffc0: 00000000 b6f04eb0 becd67d0 00000005 b6f05040 00000fff 000a6e38 0000000a [ 153.078125] ffe0: becd6c54 becd6710 b6ebeed4 b6eee76c 60000010 b6ef8990 27ffe831 27ffec31 [ 153.078125] [<c01bcab4>] (ip_local_out+0x28/0x2c) from [<c01be694>] (ip_send_skb+0x8/0x58) [ 153.078125] [<c01be694>] (ip_send_skb+0x8/0x58) from [<c01dbbe0>] (udp_send_skb+0x180/0x250) [ 153.078125] [<c01dbbe0>] (udp_send_skb+0x180/0x250) from [<c01dd420>] (udp_sendmsg+0x474/0x67c) [ 153.078125] [<c01dd420>] (udp_sendmsg+0x474/0x67c) from [<c01e3bec>] (inet_sendmsg+0x60/0x70) [ 153.078125] [<c01e3bec>] (inet_sendmsg+0x60/0x70) from [<c018e1f8>] (sock_sendmsg+0x80/0xa0) [ 153.078125] [<c018e1f8>] (sock_sendmsg+0x80/0xa0) from [<c018e4b0>] (kernel_sendmsg+0x3c/0x70) [ 153.078125] [<c018e4b0>] (kernel_sendmsg+0x3c/0x70) from [<c01fc444>] (xs_send_kvec+0x98/0xa8) [ 153.078125] [<c01fc444>] (xs_send_kvec+0x98/0xa8) from [<c01fc4d8>] (xs_sendpages+0x84/0x1e8) [ 153.078125] [<c01fc4d8>] (xs_sendpages+0x84/0x1e8) from [<c01fc820>] (xs_udp_send_request+0x38/0xb4) [ 153.078125] [<c01fc820>] (xs_udp_send_request+0x38/0xb4) from [<c01faa90>] (xprt_transmit+0xd0/0x1e8) [ 153.078125] [<c01faa90>] (xprt_transmit+0xd0/0x1e8) from [<c01f8168>] (call_transmit+0x12c/0x194) [ 153.078125] [<c01f8168>] (call_transmit+0x12c/0x194) from [<c01fe95c>] (__rpc_execute+0x4c/0xfc) [ 153.078125] [<c01fe95c>] (__rpc_execute+0x4c/0xfc) from [<c01f9264>] (rpc_run_task+0xa4/0xb0) [ 153.078125] [<c01f9264>] (rpc_run_task+0xa4/0xb0) from [<c01f92c0>] (rpc_call_sync+0x50/0x74) [ 153.078125] [<c01f92c0>] (rpc_call_sync+0x50/0x74) from [<c00c46dc>] (nfs_rpc_wrapper.clone.6+0x28/0x64) [ 153.078125] [<c00c46dc>] (nfs_rpc_wrapper.clone.6+0x28/0x64) from [<c00c4d24>] (nfs_proc_getattr+0x48/0x54) [ 153.078125] [<c00c4d24>] (nfs_proc_getattr+0x48/0x54) from [<c00baed4>] (__nfs_revalidate_inode+0x8c/0x114) [ 153.078125] [<c00baed4>] (__nfs_revalidate_inode+0x8c/0x114) from [<c00b66a4>] (nfs_lookup_revalidate+0x144/0x2ec) [ 153.078125] [<c00b66a4>] (nfs_lookup_revalidate+0x144/0x2ec) from [<c0073528>] (lookup_fast+0x1b4/0x260) [ 153.078125] [<c0073528>] (lookup_fast+0x1b4/0x260) from [<c0075048>] (do_last.clone.41+0x130/0x5cc) [ 153.078125] [<c0075048>] (do_last.clone.41+0x130/0x5cc) from [<c0075588>] (path_openat+0xa4/0x3d8) [ 153.078125] [<c0075588>] (path_openat+0xa4/0x3d8) from [<c00758ec>] (do_filp_open+0x30/0x7c) [ 153.078125] [<c00758ec>] (do_filp_open+0x30/0x7c) from [<c00695ac>] (do_sys_open+0xd8/0x170) [ 153.078125] [<c00695ac>] (do_sys_open+0xd8/0x170) from [<c0009200>] (ret_fast_syscall+0x0/0x2c) [ 153.078125] Code: 00000000 00000000 00000000 31313a30 (fdd20000) [ 153.078125] ---[ end trace ee2f60ac8ae81fb8 ]---
and another:
# flash_erase /dev/mtd0 0 8192 Erasing 16 Kibyte @ 7ffc000 -- 100 % complete # ./ubiattach -m 0 [ 97.273437] UBI: attaching mtd0 to ubi0 [ 97.609375] UBI: scanning is finished [ 97.617187] UBI: empty MTD device detected [ 97.625000] ------------[ cut here ]------------ [ 97.625000] kernel BUG at mm/slob.c:331! [ 97.625000] Internal error: Oops - BUG: 0 [#1] ARM [ 97.625000] CPU: 0 Not tainted (3.6.0-rc1+ #888) [ 97.625000] PC is at slob_alloc.clone.18+0x174/0x1b4 [ 97.625000] LR is at slob_page_alloc+0x1a8/0x1d0 [ 97.625000] pc : [<c0068130>] lr : [<c0067c40>] psr: 60000093 [ 97.625000] sp : c7af3e08 ip : 00000000 fp : 01620014 [ 97.625000] r10: 00000000 r9 : a0000013 r8 : 00007bb3 [ 97.625000] r7 : c0313000 r6 : 00000030 r5 : c040a660 r4 : c02d3908 [ 97.625000] r3 : 01620014 r2 : 01620013 r1 : fe9dffec r0 : 00000000 [ 97.625000] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 97.625000] Control: 0005317f Table: 27b4c000 DAC: 00000015 [ 97.625000] Process ubiattach (pid: 351, stack limit = 0xc7af2270) [ 97.625000] Stack: (0xc7af3e08 to 0xc7af4000) [ 97.625000] 3e00: 00000030 000000d0 01620014 c7b1c2a0 c7ba5314 00000000 [ 97.625000] 3e20: c7ba52c0 c7b1c3e0 00000001 00000001 c7ba5310 c0068374 00000000 c7bae240 [ 97.625000] 3e40: c7ba5314 c0174c40 00003e00 c7ad9a60 00000200 00000001 00003e00 00000000 [ 97.625000] 3e60: 00000000 02000200 00000002 00000000 00003e00 7fffefff 00000001 c7ad9a60 [ 97.625000] 3e80: c7b1c3e0 c7bae240 c7b1c450 c7ad9a60 c7b1c3e0 01000000 00000000 00000000 [ 97.625000] 3ea0: 00000000 c01673a0 c7bae240 00000000 c7ad9a60 00000000 00000000 02000000 [ 97.625000] 3ec0: 00000014 c89ca000 000080d2 c7ad9a60 c89ca000 c7b1c3e0 00000000 c89cde7c [ 97.625000] 3ee0: c7af2000 00000000 00000000 c0168374 c7ad9a60 c7b1c3e0 00000000 c79315c0 [ 97.625000] 3f00: 00000014 c0175998 c7ad9a60 00000000 00000000 c016b260 c7aac3f0 c7aacc50 [ 97.625000] 3f20: c7aa7020 40186f40 40186f40 00000000 bedd1b20 c79315c0 40186f40 00000003 [ 97.625000] 3f40: c0009388 c016b758 ffffffff 00000000 00000000 00000000 00000000 00000000 [ 97.625000] 3f60: bedd1b20 00000003 40186f40 c0078684 c7b36600 00000003 40186f40 c7b36600 [ 97.625000] 3f80: bedd1b20 c00786f4 00000003 00000000 bedd1b20 bedd1b20 40186f40 00000003 [ 97.625000] 3fa0: 00000036 c0009200 bedd1b20 40186f40 00000003 40186f40 bedd1b20 00000000 [ 97.625000] 3fc0: bedd1b20 40186f40 00000003 00000036 ffffffff 0001442c ffffffff 00000000 [ 97.625000] 3fe0: b6f7bec4 bedd1ae0 000098ec b6f7bf08 60000010 00000003 27ffe831 27ffec31 [ 97.625000] [<c0068130>] (slob_alloc.clone.18+0x174/0x1b4) from [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) [ 97.625000] [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) from [<c0174c40>] (ubi_add_to_av+0x318/0x3fc) [ 97.625000] [<c0174c40>] (ubi_add_to_av+0x318/0x3fc) from [<c01673a0>] (create_vtbl+0x1cc/0x258) [ 97.625000] [<c01673a0>] (create_vtbl+0x1cc/0x258) from [<c0168374>] (ubi_read_volume_table+0xe0/0x1f0) [ 97.625000] [<c0168374>] (ubi_read_volume_table+0xe0/0x1f0) from [<c0175998>] (ubi_attach+0x54/0xac) [ 97.625000] [<c0175998>] (ubi_attach+0x54/0xac) from [<c016b260>] (ubi_attach_mtd_dev+0x1bc/0x474) [ 97.625000] [<c016b260>] (ubi_attach_mtd_dev+0x1bc/0x474) from [<c016b758>] (ctrl_cdev_ioctl+0xd8/0x168) [ 97.625000] [<c016b758>] (ctrl_cdev_ioctl+0xd8/0x168) from [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) [ 97.625000] [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) from [<c00786f4>] (sys_ioctl+0x34/0x54) [ 97.625000] [<c00786f4>] (sys_ioctl+0x34/0x54) from [<c0009200>] (ret_fast_syscall+0x0/0x2c) [ 97.625000] Code: e1a0200b ebfffe5b e250a000 1a000000 (e7f001f2) [ 97.625000] ---[ end trace 8743f692af56986c ]--- Segmentation fault
yet another one:
# ./ubiattach -m 0 [ 159.718750] UBI: attaching mtd0 to ubi0 [ 160.031250] UBI: scanning is finished [ 160.031250] UBI: empty MTD device detected [ 160.656250] UBI: attached mtd0 (name "NAND simulator partition 0", size 128 MiB) to ubi0 [ 160.664062] UBI: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes [ 160.671875] UBI: min./max. I/O unit sizes: 512/512, sub-page size 256 [ 160.679687] UBI: VID header offset: 256 (aligned 256), data offset: 512 [ 160.687500] UBI: good PEBs: 8192, bad PEBs: 0, corrupted PEBs: 0 [ 160.695312] UBI: user volume: 0, internal volumes: 1, max. volumes count: 92 [ 160.703125] UBI: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1661313839 [ 160.710937] UBI: available PEBs: 8028, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160 [ 160.718750] UBI: background thread "ubi_bgt0d" started, PID 327 UBI device numb[ 160.742187] Unable to handle kernel paging request at virtual address 5af0c7b4 e[ 160.750000] pgd = c0004000 r[ 160.750000] [5af0c7b4] *pgd=00000000 0[ 160.757812] Internal error: Oops: 5 [#1] ARM [ 160.757812] CPU: 0 Not tainted (3.6.0-rc1+ #890) [ 160.757812] PC is at unlink_anon_vmas+0x2c/0x18c [ 160.757812] LR is at free_pgtables+0x28/0xa0 [ 160.757812] pc : [<c0063a38>] lr : [<c005b118>] psr: 80000013 [ 160.757812] sp : c7ab9eb0 ip : 00000880 fp : c0291e0f [ 160.757812] r10: b6eee000 r9 : 00100100 r8 : 5af0c7b4 [ 160.757812] r7 : 6b30c7a5 r6 : c7abd8e0 r5 : 00000000 r4 : c7abfb7a [ 160.757812] r3 : c7abfb82 r2 : 00200000 r1 : 00008000 r0 : c7abd8a8 [ 160.757812] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 160.757812] Control: 0005317f Table: 27ae4000 DAC: 00000015 [ 160.757812] Process ubiattach (pid: 325, stack limit = 0xc7ab8270) [ 160.757812] Stack: (0xc7ab9eb0 to 0xc7aba000) [ 160.757812] 9ea0: c7abd8a8 c7abd8a8 00200000 c7abd788 [ 160.757812] 9ec0: 00000000 00001000 c7ab9f08 c7abd8a8 c7abd8a8 b6eee000 00000000 c005b118 [ 160.757812] 9ee0: b6eee000 c7ad5600 c7ac82a0 c7ad5600 00000000 c7ac82d4 c0009388 c7ab8000 [ 160.757812] 9f00: 00000000 c006024c c7ac82a0 00000001 00000000 c0008ea0 c78f27e0 00000000 [ 160.757812] 9f20: 00000400 c7b36000 c78f27e0 c7ac82a0 00000001 c7ab8000 c78f27e0 c7ac82a0 [ 160.757812] 9f40: c7ac82a0 00000000 c7ac82a0 00000000 00000000 c0014bd4 c7ac82a0 c7ac8000 [ 160.757812] 9f60: 00000000 c0019914 c7ac8000 0000003d c7a46780 c7ac8000 00000000 00000001 [ 160.757812] 9f80: 000000f8 c001af2c 00000000 00000000 b6f5c2ec c001b0d0 b6f1e98c c001b10c [ 160.757812] 9fa0: 00000000 c0009200 b6f1e98c 00000000 00000000 00060d4c 00060d24 00000000 [ 160.757812] 9fc0: b6f1e98c 00000000 b6f5c2ec 000000f8 00000000 00000000 b6f6ff70 00000000 [ 160.757812] 9fe0: b6f5bebc be80bbf0 b6f42820 b6efb23c 60000010 00000000 00000000 00000000 [ 160.757812] [<c0063a38>] (unlink_anon_vmas+0x2c/0x18c) from [<c005b118>] (free_pgtables+0x28/0xa0) [ 160.757812] [<c005b118>] (free_pgtables+0x28/0xa0) from [<c006024c>] (exit_mmap+0xcc/0x19c) [ 160.757812] [<c006024c>] (exit_mmap+0xcc/0x19c) from [<c0014bd4>] (mmput+0x38/0xa8) [ 160.757812] [<c0014bd4>] (mmput+0x38/0xa8) from [<c0019914>] (exit_mm+0xe8/0xec) [ 160.757812] [<c0019914>] (exit_mm+0xe8/0xec) from [<c001af2c>] (do_exit+0x1d0/0x2c4) [ 160.757812] [<c001af2c>] (do_exit+0x1d0/0x2c4) from [<c001b0d0>] (do_group_exit+0x84/0xb0) [ 160.757812] [<c001b0d0>] (do_group_exit+0x84/0xb0) from [<c001b10c>] (sys_exit_group+0x10/0x18) [ 160.757812] [<c001b10c>] (sys_exit_group+0x10/0x18) from [<c0009200>] (ret_fast_syscall+0x0/0x2c) [ 160.757812] Code: e59fb158 e59f9158 ea000028 e5948004 (e598a000) ,[ 160.984375] ---[ end trace a5ec5c26278be2bc ]--- [ 160.992187] Fixing recursive fault but reboot is needed! total 8192 LEBs (130023424 bytes, 124.0 MiB), available 8028 LEBs (127420416 bytes, 121.5 MiB), LEB size 15872 bytes (15.5 KiB)
as you can see, the oops is not always at the same place, and does not happened at the same moment
BUT something important I forgot to tell:
# flash_erase /dev/mtd0 0 8192 # ubiformat /dev/mtd0 # ubiattach -m 0 If I do a ubiformat after the flash_erase, I don't have an oops.
Quoted 2 lines
We renamed all scan functions recently, so AFAICS you are not using the latest UBI code-base. How about picking the latest back-port tree?
Did the same thing, with the new UBI code, same result, once those are not freed, I don't get oopses anymore.
drivers/mtd/ubi/vtbl.c +2 -2
@@ -340,8 +340,8 @@ retry:* of this LEB as it will be deleted and freed in 'ubi_add_to_av()'. */ err =ubi_add_to_av (ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr,0 ); -kfree (new_aeb); -ubi_free_vid_hdr (ubi, vid_hdr); +// kfree(new_aeb); +// ubi_free_vid_hdr(ubi, vid_hdr); return err; write_error:
Quoted 2 lines
This is strange, I think these 2 frees are all-right, I think the root-cause is somewhere else.
Yes, I didn't see neither the problem with those.
It's like the new_aeb and vid_hdr structs are still used after being freed, but I couldn't find out where.
But once again, as I can't boot with a vanilla kernel or linux-ubi kernel, I can't guarantee that this bug comes from UBI and not from somewhere else.
here is the "minimal" .config I used:CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_GENERIC_GPIO=yCONFIG_HAVE_PROC_CPU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_GENERIC_BUG=yCONFIG_HAVE_IRQ_WORK=yCONFIG_EXPERIMENTAL=yCONFIG_BROKEN_ON_SMP=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=yCONFIG_KERNEL_LZO=yCONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=y CONFIG_HAVE_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_IRQ_DOMAIN=yCONFIG_SPARSE_IRQ=yCONFIG_KTIME_SCALAR=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_TINY_RCU=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=yCONFIG_ANON_INODES=yCONFIG_EXPERT=yCONFIG_UID16=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_EMBEDDED=yCONFIG_HAVE_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=yCONFIG_SLOB=yCONFIG_HAVE_OPROFILE=yCONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_RT_MUTEXES=yCONFIG_BLOCK=yCONFIG_MSDOS_PARTITION=y CONFIG_IOSCHED_NOOP=yCONFIG_DEFAULT_NOOP=y CONFIG_INLINE_SPIN_UNLOCK_IRQ=y CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_MMU=yCONFIG_ARCH_AT91=yCONFIG_HAVE_AT91_DBGU0=y CONFIG_AT91_SAM9_ALT_RESET=y CONFIG_AT91_SAM9G45_RESET=y CONFIG_SOC_AT91SAM9=y CONFIG_SOC_AT91SAM9X5=y CONFIG_ARCH_AT91SAM9X5=y CONFIG_AT91_PMC_UNIT=y CONFIG_MACH_AT91SAM_DT=y CONFIG_AT91_PROGRAMMABLE_CLOCKS=y CONFIG_CPU_ARM926T=y
CONFIG_CPU_32v5=yCONFIG_CPU_ABRT_EV5TJ=y CONFIG_CPU_PABRT_LEGACY=y CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=yCONFIG_CPU_CP15=yCONFIG_CPU_CP15_MMU=y CONFIG_CPU_USE_DOMAINS=yCONFIG_ARM_THUMB=y CONFIG_MULTI_IRQ_HANDLER=y CONFIG_VMSPLIT_3G=yCONFIG_PREEMPT_NONE=yCONFIG_AEABI=yCONFIG_OABI_COMPAT=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=y CONFIG_HAVE_MEMBLOCK=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_VIRT_TO_BUS=y CONFIG_NEED_PER_CPU_KM=y CONFIG_ALIGNMENT_TRAP=y CONFIG_UACCESS_WITH_MEMCPY=yCONFIG_USE_OF=yCONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y CONFIG_AUTO_ZRELADDR=yCONFIG_FPE_FASTFPE=yCONFIG_BINFMT_ELF=y CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y CONFIG_HAVE_AOUT=y CONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_INET_LRO=yCONFIG_BQL=yCONFIG_HAVE_BPF_JIT=yCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=yCONFIG_MTD=yCONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_OF_PARTS=yCONFIG_MTD_CHAR=yCONFIG_MTD_BLKDEVS=yCONFIG_MTD_BLOCK=y CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=yCONFIG_MTD_CFI_I2=yCONFIG_MTD_NAND_ECC=yCONFIG_MTD_NAND=yCONFIG_MTD_NAND_IDS=y CONFIG_MTD_NAND_NANDSIM=yCONFIG_MTD_UBI=yCONFIG_DTC=yCONFIG_OF=yCONFIG_PROC_DEVICETREE=y CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_ADDRESS=yCONFIG_OF_IRQ=yCONFIG_OF_DEVICE=yCONFIG_OF_NET=yCONFIG_OF_MDIO=yCONFIG_OF_MTD=yCONFIG_BLK_DEV=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_RAM=yCONFIG_SCSI_MOD=yCONFIG_NETDEVICES=yCONFIG_NET_CORE=yCONFIG_MII=yCONFIG_ETHERNET=yCONFIG_HAVE_NET_MACB=yCONFIG_NET_CADENCE=yCONFIG_MACB=yCONFIG_PHYLIB=yCONFIG_DAVICOM_PHY=yCONFIG_INPUT=yCONFIG_SERIO=yCONFIG_SERIO_SERPORT=yCONFIG_SERIO_LIBPS2=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=y CONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_PINCTRL=yCONFIG_PINMUX=yCONFIG_PINCTRL_AT91=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIOLIB=yCONFIG_OF_GPIO=yCONFIG_SSB_POSSIBLE=yCONFIG_BCMA_POSSIBLE=y CONFIG_HAVE_FB_ATMEL=y CONFIG_DUMMY_CONSOLE=yCONFIG_HID=yCONFIG_HIDRAW=yCONFIG_HID_GENERIC=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=yCONFIG_RTC_LIB=yCONFIG_CLKDEV_LOOKUP=yCONFIG_FILE_LOCKING=yCONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_FANOTIFY=yCONFIG_PROC_FS=yCONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V2=yCONFIG_ROOT_NFS=yCONFIG_LOCKD=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_PRINTK_TIME=y CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_STRIP_ASM_SYMS=yCONFIG_DEBUG_FS=y CONFIG_DEBUG_SECTION_MISMATCH=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACING_SUPPORT=y CONFIG_HAVE_ARCH_KGDB=yCONFIG_ARM_UNWIND=yCONFIG_DEBUG_USER=y CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_BITREVERSE=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IO=yCONFIG_CRC32=yCONFIG_CRC32_SLICEBY8=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_DQL=yCONFIG_NLATTR=yCONFIG_GENERIC_ATOMIC64=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
Quoted 35 lines · Richard Genoud
Quoted 2 lines
If you could somehow reproduce this with nandsim, it would make it easy for me to find the bug.
here it is:
[ 0.921875] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.929687] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.937500] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.953125] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.960937] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.968750] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 0.976562] NAND device: Manufacturer ID: 0x98, Chip ID: 0x39 (Toshiba NAND 128MiB 1,8V 8-bit), page size: 512, OOB size: 16 [ 0.992187] flash size: 128 MiB [ 0.992187] page size: 512 bytes [ 0.992187] OOB area size: 16 bytes [ 1.000000] sector size: 16 KiB [ 1.000000] pages number: 262144 [ 1.007812] pages per sector: 32 [ 1.007812] bus width: 8 [ 1.007812] bits in sector size: 14 [ 1.015625] bits in page size: 9 [ 1.015625] bits in OOB size: 4 [ 1.023437] flash size with OOB: 135168 KiB [ 1.023437] page address bytes: 4 [ 1.031250] sector address bytes: 3 [ 1.031250] options: 0x42 [ 1.039062] Scanning device for bad blocks [ 1.242187] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": [ 1.250000] 0x000000000000-0x000008000000 : "NAND simulator partition 0"
Quoted 1 line
# flash_erase /dev/mtd0 0 8192
Hmm, cannot reproduce on my x86_64.
Signature · 2 lines
Best Regards, Artem Bityutskiy
I finally managed to reproduced it on linux-ubi/master + only one patch to make my board boot:
(I thought it needed much more code than that...)
arch/arm/mach-at91/Kconfig +0 -0
@@ -141,6 +141,10 @@ config ARCH_AT91SAM9G45
bool "AT91SAM9G45" select SOC_AT91SAM9G45
+config ARCH_AT91SAM9X5
+ bool "AT91SAM9x5"
+ select SOC_AT91SAM9X5
+
config ARCH_AT91X40
bool "AT91x40" depends on !MMU
The 1st try was a complete hang, with no trace at all. And here are 3 differents oops:
# flash_erase /dev/mtd0 0 8192 Erasing 16 Kibyte @ 7ffc000 -- 100 % complete # ubiattach -m 0 [ 162.984375] UBI: attaching mtd0 to ubi0 [ 163.273437] UBI: scanning is finished [ 163.273437] UBI: empty MTD device detected [ 163.289062] ------------[ cut here ]------------ [ 163.289062] kernel BUG at mm/slob.c:331! [ 163.289062] Internal error: Oops - BUG: 0 [#1] ARM [ 163.289062] CPU: 0 Not tainted (3.6.0-rc1+ #893) [ 163.289062] PC is at slob_alloc.clone.18+0x17c/0x1c0 [ 163.289062] LR is at slob_page_alloc+0x1a8/0x1d0 [ 163.289062] pc : [<c006c23c>] lr : [<c006bd28>] psr: 60000093 [ 163.289062] sp : c740fd30 ip : 00000000 fp : 04f20014 [ 163.289062] r10: 00000000 r9 : a0000013 r8 : 00007406 [ 163.289062] r7 : c02a5000 r6 : 00000030 r5 : c038d0c0 r4 : c0281c70 [ 163.289062] r3 : 04f20014 r2 : 04f20013 r1 : fb0dffec r0 : 00000000 [ 163.289062] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 163.289062] Control: 0005317f Table: 27a9c000 DAC: 00000015 [ 163.289062] Process ubiattach (pid: 336, stack limit = 0xc740e270) [ 163.289062] Stack: (0xc740fd30 to 0xc7410000) [ 163.289062] fd20: 00000030 000000d0 04f20014 c7aac9c0 [ 163.289062] fd40: 00000000 c7401060 c7aac940 c74010b4 c7ac1960 c74010b0 00000000 c006c4a8 [ 163.289062] fd60: 00000000 c7b2b560 00000000 c013a6b8 00003e00 c01378dc 00003e00 c740fdac [ 163.289062] fd80: c8970000 c7b2b560 00000002 00000000 00000001 7fffefff 00000001 00000000 [ 163.289062] fda0: 00000001 02000200 c7aac940 00000001 00000000 c7b2b560 c7aace08 c7ac1960 [ 163.289062] fdc0: c7aac940 01000000 00000000 00000000 00000000 c012dd94 c7b2b560 00000000 [ 163.289062] fde0: c7ac1960 00000000 00000000 02000000 c7a2d260 c8970000 000080d2 c7ac1960 [ 163.289062] fe00: c8970000 00000000 c7aac940 c8973e7c c7aac94c 000000a0 00000000 c012e574 [ 163.289062] fe20: 00000000 00000000 00000000 00002000 c7aac940 00000000 c7aac940 c7ac1960 [ 163.289062] fe40: 00000199 c7a2d260 c7aac94c 000000a0 00000000 c013c00c ffffffff 00000000 [ 163.289062] fe60: c7aac954 00000040 80000013 c0281c70 c7aac954 c7aac944 c7aac94c c7aac95c [ 163.289062] fe80: 00000040 000080d0 00000020 00000020 c7ac1960 c7ac1ddc 00000140 fffffe00 [ 163.289062] fea0: c7ac1960 00000000 00000000 c7a2d260 00000000 000000a0 00000000 c01317d8 [ 163.289062] fec0: c7a42010 c7a3bed0 00000002 00000000 00000000 c740ff78 00000001 bead4af8 [ 163.289062] fee0: c7a2d260 bead4af8 c7a3e4b0 00000003 c740e000 00000000 00000000 c0131fa8 [ 163.289062] ff00: ffffffff 00000000 00000000 00000000 00000000 00000000 c7ac7c00 bead4af8 [ 163.289062] ff20: bead4af8 c007c5b4 00000000 00000000 00000000 00000000 00000000 00000003 [ 163.289062] ff40: 00000003 c0385a20 00000000 c004f75c 00000000 00000003 c7ac7c00 c7051000 [ 163.289062] ff60: c7ac7c08 c006c520 c027a224 c7ac7c00 bead4af8 40186f40 00000003 c000d9c4 [ 163.289062] ff80: c740e000 c007c66c 00000003 00000000 bead4af8 bead4af8 40186f40 00000003 [ 163.289062] ffa0: 00000036 c000d860 bead4af8 40186f40 00000003 40186f40 bead4af8 00000000 [ 163.289062] ffc0: bead4af8 40186f40 00000003 00000036 00000003 bead4db4 00000000 00000000 [ 163.289062] ffe0: b6f62ec4 bead4ab0 000098c8 b6f62f08 60000010 00000003 00000000 08000002 [ 163.289062] [<c006c23c>] (slob_alloc.clone.18+0x17c/0x1c0) from [<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64) [ 163.289062] [<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64) from [<c013a6b8>] (ubi_add_to_av+0x6c0/0x7cc) [ 163.289062] [<c013a6b8>] (ubi_add_to_av+0x6c0/0x7cc) from [<c012dd94>] (create_vtbl+0x1cc/0x258) [ 163.289062] [<c012dd94>] (create_vtbl+0x1cc/0x258) from [<c012e574>] (ubi_read_volume_table+0xe4/0x960) [ 163.289062] [<c012e574>] (ubi_read_volume_table+0xe4/0x960) from [<c013c00c>] (ubi_attach+0x13d0/0x147c) [ 163.289062] [<c013c00c>] (ubi_attach+0x13d0/0x147c) from [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) [ 163.289062] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) [ 163.289062] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) [ 163.289062] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from [<c007c66c>] (sys_ioctl+0x34/0x54) [ 163.289062] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>] (ret_fast_syscall+0x0/0x2c) [ 163.289062] Code: e1a0200b ebfffe52 e250a000 1a000000 (e7f001f2) [ 163.289062] ---[ end trace adca1a6dde15e0c1 ]--- Segmentation fault #
another:
# flash_erase /dev/mtd0 0 8192 Erasing 16 Kibyte @ 7ffc000 -- 100 % complete # ubiattach -m 0 [ 61.882812] UBI: attaching mtd0 to ubi0 [ 62.171875] UBI: scanning is finished [ 62.179687] UBI: empty MTD device detected [ 62.187500] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 62.195312] pgd = c7adc000 [ 62.203125] [00000000] *pgd=27ad9831, *pte=00000000, *ppte=00000000 [ 62.203125] Internal error: Oops: 17 [#1] ARM [ 62.203125] CPU: 0 Not tainted (3.6.0-rc1+ #893) [ 62.203125] PC is at ubi_wl_init+0x138/0x36c [ 62.203125] LR is at schedule_erase+0x50/0x64 [ 62.203125] pc : [<c0139b18>] lr : [<c013845c>] psr: 60000013 [ 62.203125] sp : c7acbe28 ip : 00008000 fp : 00000000 [ 62.203125] r10: c7ad2890 r9 : c029ff5c r8 : ffffffe0 [ 62.203125] r7 : c7aaef00 r6 : c7aaef14 r5 : c7ad2508 r4 : c7a6e440 [ 62.203125] r3 : 00000000 r2 : c7a6e838 r1 : c7ad2860 r0 : 00000000 [ 62.203125] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 62.203125] Control: 0005317f Table: 27adc000 DAC: 00000015 [ 62.203125] Process ubiattach (pid: 329, stack limit = 0xc7aca270) [ 62.203125] Stack: (0xc7acbe28 to 0xc7acc000) [ 62.203125] be20: 00000000 c7aaef00 7fffefff 00000000 c7aaef00 c7a6e440 [ 62.203125] be40: 00000199 c7a2d260 c7aaef0c 000000a0 00000000 c013c020 ffffffff 00000000 [ 62.203125] be60: c7aaef14 00000040 80000013 c039a634 c7aaef14 c7aaef04 c7aaef0c c7aaef1c [ 62.203125] be80: 00000040 000080d0 00000020 00000020 c7a6e440 c7a6e8bc 00000140 fffffe00 [ 62.203125] bea0: c7a6e440 00000000 00000000 c7a2d260 00000000 000000a0 00000000 c01317d8 [ 62.203125] bec0: c7a42010 c7a3bed0 00000002 00000000 00000000 c7acbf78 00000001 be873af8 [ 62.203125] bee0: c7a2d260 be873af8 c7a3e4b0 00000003 c7aca000 00000000 00000000 c0131fa8 [ 62.203125] bf00: ffffffff 00000000 00000000 00000000 00000000 00000000 c7aadae0 be873af8 [ 62.203125] bf20: be873af8 c007c5b4 00000000 00000000 00000000 00000000 00000000 00000003 [ 62.203125] bf40: 00000003 c039a100 00000000 c004f75c 00000000 00000003 c7aadae0 c7a88000 [ 62.203125] bf60: c7aadae8 c006c520 c027a224 c7aadae0 be873af8 40186f40 00000003 c000d9c4 [ 62.203125] bf80: c7aca000 c007c66c 00000003 00000000 be873af8 be873af8 40186f40 00000003 [ 62.203125] bfa0: 00000036 c000d860 be873af8 40186f40 00000003 40186f40 be873af8 00000000 [ 62.203125] bfc0: be873af8 40186f40 00000003 00000036 00000003 be873db4 00000000 00000000 [ 62.203125] bfe0: b6ed3ec4 be873ab0 000098c8 b6ed3f08 60000010 00000003 27ffe831 27ffec31 [ 62.203125] [<c0139b18>] (ubi_wl_init+0x138/0x36c) from [<c013c020>] (ubi_attach+0x13e4/0x147c) [ 62.203125] [<c013c020>] (ubi_attach+0x13e4/0x147c) from [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) [ 62.203125] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) [ 62.203125] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) [ 62.203125] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from [<c007c66c>] (sys_ioctl+0x34/0x54) [ 62.203125] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>] (ret_fast_syscall+0x0/0x2c) [ 62.203125] Code: e1a01005 e5930000 ebfcca73 ea000074 (e5983020) [ 62.460937] ---[ end trace 41b3746085dc3822 ]--- Segmentation fault
and a big one:
# ubiattach -m 0
[ 44.507812] UBI: attaching mtd0 to ubi0
[ 44.796875] UBI: scanning is finished
[ 44.804687] UBI: empty MTD device detected
[ 44.820312] BUG: Bad page state in process klogd pfn:27ad3
[ 44.820312] page:c039aa60 count:0 mapcount:81 mapping: (null)
index:0xc7ad3ae0
[ 44.828125] page flags: 0x800(private)
[ 44.835937] [<c00119e8>] (unwind_backtrace+0x0/0xe4) from
[<c004ef88>] (bad_page+0xcc/0xf8)
[ 44.843750] [<c004ef88>] (bad_page+0xcc/0xf8) from [<c004fea8>]
(get_page_from_freelist+0x38c/0x4b8)
[ 44.851562] [<c004fea8>] (get_page_from_freelist+0x38c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 44.859375] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 44.875000] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[ 44.882812] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[ 44.890625] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[ 44.898437] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[ 44.906250] Disabling lock debugging due to kernel taint
[ 44.914062] Unable to handle kernel paging request at virtual
address 00100104
[ 44.914062] pgd = c7aa8000
[ 44.914062] [00100104] *pgd=27a7e831, *pte=00000000, *ppte=00000000
[ 44.914062] Internal error: Oops: 817 [#1] ARM
[ 44.914062] CPU: 0 Tainted: G B (3.6.0-rc1+ #893)
[ 44.914062] PC is at get_page_from_freelist+0x24c/0x4b8
[ 44.914062] LR is at get_page_from_freelist+0x38c/0x4b8
[ 44.914062] pc : [<c004fd68>] lr : [<c004fea8>] psr: 60000093
[ 44.914062] sp : c7aa1e68 ip : 60000013 fp : 60000013
[ 44.914062] r10: c039aa60 r9 : c029ad10 r8 : c0290b10
[ 44.914062] r7 : b6fcd990 r6 : c0290558 r5 : c03ae04c r4 : 00000000
[ 44.914062] r3 : 00200200 r2 : 00100100 r1 : 00200200 r0 : 00000000
[ 44.914062] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM
Segment user
[ 44.914062] Control: 0005317f Table: 27aa8000 DAC: 00000015
[ 44.914062] Process klogd (pid: 302, stack limit = 0xc7aa0270)
[ 44.914062] Stack: (0xc7aa1e68 to 0xc7aa2000)
[ 44.914062] 1e60: 00000041 00000000 c7aa1ec0
000200d0 00000001 00000008
[ 44.914062] 1e80: c0290b14 00000000 ffffffff 00000000 c7aa0000
00000000 00000101 00000000
[ 44.914062] 1ea0: c7b420c0 c0290558 fffffdee 000000d0 01ffffff
00000000 b6fcd990 c0290b10
[ 44.914062] 1ec0: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[ 44.914062] 1ee0: 00000000 00000000 c7a6f000 00000000 000200d0
c78296a0 c78296d8 c00eded0
[ 44.914062] 1f00: c02809b8 c78296a0 c78296a0 c02809b8 c78296d0
c0290558 c0038dac c7802780
[ 44.914062] 1f20: 00000000 00000000 b6fcd990 c000d9c4 c7aa0000
00000000 0000000a c006c084
[ 44.914062] 1f40: 00000020 c006c4c4 c027a224 00000000 00000000
c00762d4 00000000 00000000
[ 44.914062] 1f60: ffffff9c beefb7d0 00000001 c006d6a8 c7aa1f90
0000004e 00000000 beef0000
[ 44.914062] 1f80: 00000024 00000100 00000000 00000000 b6fd9eb0
beefb7d0 00000005 c000d9c4
[ 44.914062] 1fa0: 00000000 c000d860 00000000 b6fd9eb0 b6fcd990
00000000 00000054 b6fd9eb0
[ 44.914062] 1fc0: 00000000 b6fd9eb0 beefb7d0 00000005 b6fda040
00000fff 000a6e38 0000000a
[ 44.914062] 1fe0: beefbc54 beefb710 b6f93ed4 b6fc376c 60000010
b6fcd990 00000000 00000000
[ 44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 44.914062] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[ 44.914062] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[ 44.914062] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[ 44.914062] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[ 44.914062] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[ 44.914062] ---[ end trace 4f68e63fbfe364d4 ]---
[ 44.914062] Unable to handle kernel paging request at virtual
address 00100104
[ 44.914062] pgd = c0004000
[ 44.914062] [00100104] *pgd=00000000
[ 44.914062] Internal error: Oops: 817 [#2] ARM
[ 44.914062] CPU: 0 Tainted: G B D (3.6.0-rc1+ #893)
[ 44.914062] PC is at get_page_from_freelist+0x24c/0x4b8
[ 44.914062] LR is at zone_watermark_ok+0x18/0x1c
[ 44.914062] pc : [<c004fd68>] lr : [<c004dce0>] psr: 60000093
[ 44.914062] sp : c7aa1b78 ip : 00000041 fp : 60000093
[ 44.914062] r10: c039aa60 r9 : c029ad10 r8 : c0290b10
[ 44.914062] r7 : c7a776f4 r6 : c0290558 r5 : c03ae04c r4 : 00000000
[ 44.914062] r3 : 00200200 r2 : 00100100 r1 : 00200200 r0 : 00000001
[ 44.914062] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM
Segment user
[ 44.914062] Control: 0005317f Table: 27aa8000 DAC: 00000015
[ 44.914062] Process klogd (pid: 302, stack limit = 0xc7aa0270)
[ 44.914062] Stack: (0xc7aa1b78 to 0xc7aa2000)
[ 44.914062] 1b60:
00000041 c0291934
[ 44.914062] 1b80: c0294d50 00020200 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[ 44.914062] 1ba0: c7aa0000 00000000 c7aa1c08 00000000 00000001
c0290558 00000006 00000200
[ 44.914062] 1bc0: 01ffffff 00000000 c7a776f4 c0290b10 00000000
00000000 c0290558 c00500bc
[ 44.914062] 1be0: 00000000 00000041 c0290558 00000000 c0291934
00000000 c02815fc c0290558
[ 44.914062] 1c00: 00020200 c0281618 00000001 c00530f4 000002dc
c0053b3c c02815fc c0290558
[ 44.914062] 1c20: 00000001 c0290558 c02815bc c7a776c0 c7a95d20
00000000 c7a776f4 00000817
[ 44.914062] 1c40: c7a776f4 60000093 00000001 c005063c c7aa1c78
c0063e08 c7a776c0 00000001
[ 44.914062] 1c60: 00000000 00000001 00000093 00000000 00000008
c7aa1c78 00000006 00000004
[ 44.914062] 1c80: c0291d5e 00000000 00000000 60000093 c7a776c0
00000000 c7a776c0 00000000
[ 44.914062] 1ca0: 00000000 c00175a8 c7a776c0 c7a6f000 00000000
c001c5bc c7a6f000 00000000
[ 44.914062] 1cc0: c7a77be0 c7a6f000 0000000b c7aa0000 c0220eac
c001db5c 00010000 c01d5d18
[ 44.914062] 1ce0: c0222c31 c7aa1cfc 00000002 c7aa1e20 0000000b
c7aa0000 c0220eac 00000817
[ 44.914062] 1d00: c7a776f4 60000093 00010000 c00109f4 c7aa0270
0000000b 00000817 00100104
[ 44.914062] 1d20: 00000817 c7a776c0 c7aa1e20 00000000 00000029
c0012888 00100104 c7aa1e20
[ 44.914062] 1d40: c7a6f000 c7a776c0 00000817 c0012ae8 00100104
00000817 c7aa1e20 00000817
[ 44.914062] 1d60: 00000007 00100104 c7aa1e20 c027cfe0 c029ad10
c039aa60 60000013 c00085a0
[ 44.914062] 1d80: 00000000 c0049100 c7a6f000 00000012 00000000
c000e0d8 fefff000 c001ae94
[ 44.914062] 1da0: 60000013 c000d500 0000006f 00000001 c027f360
c027f360 0000002c 00000006
[ 44.914062] 1dc0: 00000004 c0291d5e 00000000 00000000 60000013
00000000 60000093 c7aa1df0
[ 44.914062] 1de0: c001ae90 c001ae94 60000013 ffffffff 00000000
00000000 00000000 00000000
[ 44.914062] 1e00: c0291d5e 0000002c c004fd68 60000093 ffffffff
c7aa1e54 c0290b10 c000d498
[ 44.914062] 1e20: 00000000 00200200 00100100 00200200 00000000
c03ae04c c0290558 b6fcd990
[ 44.914062] 1e40: c0290b10 c029ad10 c039aa60 60000013 60000013
c7aa1e68 c004fea8 c004fd68
[ 44.914062] 1e60: 60000093 ffffffff 00000041 00000000 c7aa1ec0
000200d0 00000001 00000008
[ 44.914062] 1e80: c0290b14 00000000 ffffffff 00000000 c7aa0000
00000000 00000101 00000000
[ 44.914062] 1ea0: c7b420c0 c0290558 fffffdee 000000d0 01ffffff
00000000 b6fcd990 c0290b10
[ 44.914062] 1ec0: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[ 44.914062] 1ee0: 00000000 00000000 c7a6f000 00000000 000200d0
c78296a0 c78296d8 c00eded0
[ 44.914062] 1f00: c02809b8 c78296a0 c78296a0 c02809b8 c78296d0
c0290558 c0038dac c7802780
[ 44.914062] 1f20: 00000000 00000000 b6fcd990 c000d9c4 c7aa0000
00000000 0000000a c006c084
[ 44.914062] 1f40: 00000020 c006c4c4 c027a224 00000000 00000000
c00762d4 00000000 00000000
[ 44.914062] 1f60: ffffff9c beefb7d0 00000001 c006d6a8 c7aa1f90
0000004e 00000000 beef0000
[ 44.914062] 1f80: 00000024 00000100 00000000 00000000 b6fd9eb0
beefb7d0 00000005 c000d9c4
[ 44.914062] 1fa0: 00000000 c000d860 00000000 b6fd9eb0 b6fcd990
00000000 00000054 b6fd9eb0
[ 44.914062] 1fc0: 00000000 b6fd9eb0 beefb7d0 00000005 b6fda040
00000fff 000a6e38 0000000a
[ 44.914062] 1fe0: beefbc54 beefb710 b6f93ed4 b6fc376c 60000010
b6fcd990 00000000 00000000
[ 44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c005063c>] (__get_free_pages+0x10/0x4c)
[ 44.914062] [<c005063c>] (__get_free_pages+0x10/0x4c) from
[<c0063e08>] (exit_mmap+0x94/0x19c)
[ 44.914062] [<c0063e08>] (exit_mmap+0x94/0x19c) from [<c00175a8>]
(mmput+0x38/0xa8)
[ 44.914062] [<c00175a8>] (mmput+0x38/0xa8) from [<c001c5bc>]
(exit_mm+0xe8/0xec)
[ 44.914062] [<c001c5bc>] (exit_mm+0xe8/0xec) from [<c001db5c>]
(do_exit+0x1d4/0x688)
[ 44.914062] [<c001db5c>] (do_exit+0x1d4/0x688) from [<c00109f4>]
(die+0x208/0x244)
[ 44.914062] [<c00109f4>] (die+0x208/0x244) from [<c0012888>]
(__do_kernel_fault+0x64/0x84)
[ 44.914062] [<c0012888>] (__do_kernel_fault+0x64/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[ 44.914062] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[ 44.914062] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[ 44.914062] Exception stack(0xc7aa1e20 to 0xc7aa1e68)
[ 44.914062] 1e20: 00000000 00200200 00100100 00200200 00000000
c03ae04c c0290558 b6fcd990
[ 44.914062] 1e40: c0290b10 c029ad10 c039aa60 60000013 60000013
c7aa1e68 c004fea8 c004fd68
[ 44.914062] 1e60: 60000093 ffffffff
[ 44.914062] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[ 44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 44.914062] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[ 44.914062] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[ 44.914062] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[ 44.914062] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[ 44.914062] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[ 44.914062] ---[ end trace 4f68e63fbfe364d5 ]---
[ 44.914062] Fixing recursive fault but reboot is needed!
[ 45.796875] Unable to handle kernel paging request at virtual
address 00100104
[ 45.796875] pgd = c7ad8000
[ 45.796875] [00100104] *pgd=0000001c
[ 45.796875] Unable to handle kernel paging request at virtual
address a0000400
[ 45.796875] pgd = c7ad8000
[ 45.796875] [a0000400] *pgd=00000000
[ 45.796875] Internal error: Oops: 5 [#3] ARM
[ 45.796875] CPU: 0 Tainted: G B D (3.6.0-rc1+ #893)
[ 45.796875] PC is at show_pte+0x74/0xbc
[ 45.796875] LR is at show_pte+0x3c/0xbc
[ 45.796875] pc : [<c0012708>] lr : [<c00126d0>] psr: 60000093
[ 45.796875] sp : c7ab5bb8 ip : 60000093 fp : 00010000
[ 45.796875] r10: 00000029 r9 : c7ac7254 r8 : 00000000
[ 45.796875] r7 : c7ab5cb0 r6 : 00000000 r5 : 00000000 r4 : 00000100
[ 45.796875] r3 : a0000000 r2 : 00000000 r1 : 00000000 r0 : c0220df7
[ 45.796875] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM
Segment user
[ 45.796875] Control: 0005317f Table: 27ad8000 DAC: 00000015
[ 45.796875] Process ubiattach (pid: 329, stack limit = 0xc7ab4270)
[ 45.796875] Stack: (0xc7ab5bb8 to 0xc7ab6000)
[ 45.796875] 5ba0:
00100104 00000817
[ 45.796875] 5bc0: c7ac7220 c0012878 00100104 c7ab5cb0 c7ace780
c7ac7220 00000817 c0012ae8
[ 45.796875] 5be0: 00100104 00000817 c7ab5cb0 00000817 00000007
00100104 c7ab5cb0 c027cfe0
[ 45.796875] 5c00: c029ad10 c039aa60 60000013 c00085a0 00000001
c02806d8 c7ad3b80 c00369ec
[ 45.796875] 5c20: c7ab0960 60000093 c7ab5c44 c0036af4 c7ac4000
00000001 0000000e c7ab0c18
[ 45.796875] 5c40: 00000002 c0025984 00000001 0000000e c7ab0960
00000001 c7ab0c48 c02806d8
[ 45.796875] 5c60: 00000000 c00260e0 0000000e 20000093 c02809b8
c78f54a0 c02809b8 c78f54a0
[ 45.796875] 5c80: c02809b8 c78f54a0 c7ab0c48 c02806d0 00000001
c0290c1a c004fd68 60000093
[ 45.796875] 5ca0: ffffffff c7ab5ce4 c0290b10 c000d498 00000001
00200200 00100100 00200200
[ 45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[ 45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093
ffffffff 00000041 c027e4a0
[ 45.796875] 5d00: 00000000 00020050 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[ 45.796875] 5d20: c7ab4000 00000000 00000000 00000000 c0296184
c0290558 00000100 00000050
[ 45.796875] 5d40: 01ffffff 00000000 80000013 c0290b10 00000000
00000000 c0290558 c00500bc
[ 45.796875] 5d60: 00000000 00000041 c0290558 00000000 c7ab5dd4
00000000 00000000 c0049100
[ 45.796875] 5d80: 00020050 00000012 00000000 c000e0d8 fefff000
c006c18c 60000013 c000d500
[ 45.796875] 5da0: c7ad9f60 c0290558 ffffffe0 c0281c70 c0281c5c
0000003c 80000013 c03995f4
[ 45.796875] 5dc0: 0000001e 00000000 00000020 c006c084 00000050
c006c1a4 0000003c 00000050
[ 45.796875] 5de0: 00000020 0000001c ffffffff c7b42220 ffffffff
c7ae2000 c029ff5c c7ae1fc0
[ 45.796875] 5e00: 00000000 c006c2b0 c7a73440 c0138430 ffffffff
c7a73440 c7b42220 c7ad2774
[ 45.796875] 5e20: c7ad2760 c0139afc 00000000 c7ad2760 7fffefff
00000000 c7ad2760 c7a73440
[ 45.796875] 5e40: 00000199 c7928380 c7ad276c 000000a0 00000000
c013c020 ffffffff 00000000
[ 45.796875] 5e60: c7ad2774 00000040 80000013 c0281c70 c7ad2774
c7ad2764 c7ad276c c7ad277c
[ 45.796875] 5e80: 00000040 000080d0 00000020 00000020 c7a73440
c7a738bc 00000140 fffffe00
[ 45.796875] 5ea0: c7a73440 00000000 00000000 c7928380 00000000
000000a0 00000000 c01317d8
[ 45.796875] 5ec0: c7a42bb0 c7a3bea8 00000002 00000000 00000000
c7ab5f78 00000001 bea1caf8
[ 45.796875] 5ee0: c7928380 bea1caf8 c7a3f4b0 00000003 c7ab4000
00000000 00000000 c0131fa8
[ 45.796875] 5f00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ad25a0 bea1caf8
[ 45.796875] 5f20: bea1caf8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[ 45.796875] 5f40: 00000003 c039a740 00000000 c004f75c 00000000
00000003 c7ad25a0 c7aba000
[ 45.796875] 5f60: c7ad25a8 c006c520 c027a224 c7ad25a0 bea1caf8
40186f40 00000003 c000d9c4
[ 45.796875] 5f80: c7ab4000 c007c66c 00000003 00000000 bea1caf8
bea1caf8 40186f40 00000003
[ 45.796875] 5fa0: 00000036 c000d860 bea1caf8 40186f40 00000003
40186f40 bea1caf8 00000000
[ 45.796875] 5fc0: bea1caf8 40186f40 00000003 00000036 00000003
bea1cdb4 00000000 00000000
[ 45.796875] 5fe0: b6f62ec4 bea1cab0 000098c8 b6f62f08 60000010
00000003 00000006 00000004
[ 45.796875] [<c0012708>] (show_pte+0x74/0xbc) from [<c0012878>]
(__do_kernel_fault+0x54/0x84)
[ 45.796875] [<c0012878>] (__do_kernel_fault+0x54/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[ 45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[ 45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[ 45.796875] Exception stack(0xc7ab5cb0 to 0xc7ab5cf8)
[ 45.796875] 5ca0: 00000001
00200200 00100100 00200200
[ 45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[ 45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093 ffffffff
[ 45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[ 45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 45.796875] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[ 45.796875] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c2b0>] (__kmalloc_node+0x30/0xa0)
[ 45.796875] [<c006c2b0>] (__kmalloc_node+0x30/0xa0) from
[<c0138430>] (schedule_erase+0x24/0x64)
[ 45.796875] [<c0138430>] (schedule_erase+0x24/0x64) from
[<c0139afc>] (ubi_wl_init+0x11c/0x36c)
[ 45.796875] [<c0139afc>] (ubi_wl_init+0x11c/0x36c) from
[<c013c020>] (ubi_attach+0x13e4/0x147c)
[ 45.796875] [<c013c020>] (ubi_attach+0x13e4/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[ 45.796875] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[ 45.796875] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[ 45.796875] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[ 45.796875] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[ 45.796875] Code: e3c33eff e3c3300f e59f003c e2433460 (e7932104)
[ 45.796875] ---[ end trace 4f68e63fbfe364d6 ]---
[ 45.796875] Unable to handle kernel paging request at virtual
address 00100104
[ 45.796875] pgd = c0004000
[ 45.796875] [00100104] *pgd=00000000
[ 45.796875] Internal error: Oops: 817 [#4] ARM
[ 45.796875] CPU: 0 Tainted: G B D (3.6.0-rc1+ #893)
[ 45.796875] PC is at get_page_from_freelist+0x24c/0x4b8
[ 45.796875] LR is at zone_watermark_ok+0x18/0x1c
[ 45.796875] pc : [<c004fd68>] lr : [<c004dce0>] psr: 60000093
[ 45.796875] sp : c7ab58c8 ip : 00000041 fp : 60000093
[ 45.796875] r10: c039aa60 r9 : c029ad10 r8 : c0290b10
[ 45.796875] r7 : c7ac7254 r6 : c0290558 r5 : c03ae04c r4 : 00000000
[ 45.796875] r3 : 00200200 r2 : 00100100 r1 : 00200200 r0 : 00000001
[ 45.796875] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM
Segment user
[ 45.796875] Control: 0005317f Table: 27ad8000 DAC: 00000015
[ 45.796875] Process ubiattach (pid: 329, stack limit = 0xc7ab4270)
[ 45.796875] Stack: (0xc7ab58c8 to 0xc7ab6000)
[ 45.796875] 58c0: 00000041 c0291934 c0294388
00020200 00000001 00000008
[ 45.796875] 58e0: c0290b14 00000000 ffffffff 00000000 c7ab4000
00000000 c7ab5958 00000000
[ 45.796875] 5900: 00000001 c0290558 00000006 00000200 01ffffff
00000000 c7ac7254 c0290b10
[ 45.796875] 5920: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[ 45.796875] 5940: c0291934 00000000 c001971c c0222c9f 00020200
00000000 00000001 c0291934
[ 45.796875] 5960: c029e088 00000000 00000001 00000000 c02943c0
c0290558 c01114f0 c7ac7220
[ 45.796875] 5980: c7acf668 00000000 c7ac7254 00000005 c7ac7254
60000093 00000001 c005063c
[ 45.796875] 59a0: c7ab59c8 c0063e08 c7ac7220 00000001 00000000
00000001 0000012c 00000000
[ 45.796875] 59c0: 00000008 c7ab59c8 00000006 00000004 c0291d5e
00000000 00000000 60000093
[ 45.796875] 59e0: c7ac7220 00000000 c7ac7220 00000000 00000000
c00175a8 c7ac7220 c7ace780
[ 45.796875] 5a00: 00000000 c001c5bc c7ace780 0000003d c7acea20
c7ace780 0000000b c7ab4000
[ 45.796875] 5a20: c0220eac c001db5c 00010000 c01d5d18 c0222c31
c7ab5a4c 00000002 c7ab5b70
[ 45.796875] 5a40: 0000000b c7ab4000 c0220eac 00000005 c7ac7254
60000093 00010000 c00109f4
[ 45.796875] 5a60: c7ab4270 0000000b 00000005 a0000400 00000005
c7ac7220 c7ab5b70 00000000
[ 45.796875] 5a80: 00000028 c0012888 a0000400 c7ab5b70 c7ace780
c7ac7220 00000005 c0012ae8
[ 45.796875] 5aa0: a0000400 00000005 c7ab5b70 00000005 00000005
a0000400 c7ab5b70 c027cfe0
[ 45.796875] 5ac0: c7ac7254 00000029 00010000 c00085a0 c0291470
c011153c c01114f0 c0287b4c
[ 45.796875] 5ae0: c0291470 00000027 00000018 c001a4bc 00000027
60000093 c0291470 c001aa8c
[ 45.796875] 5b00: 00000021 00000010 00000008 ffffffff 4c102108
00000000 000000e2 00000000
[ 45.796875] 5b20: 00000018 00000018 00000004 00000001 c0291d5e
00000000 00000000 60000093
[ 45.796875] 5b40: 00000000 c001ae90 00000000 00000000 00000000
00000000 c0012708 60000093
[ 45.796875] 5b60: ffffffff c7ab5ba4 00000000 c000d498 c0220df7
00000000 00000000 a0000000
[ 45.796875] 5b80: 00000100 00000000 00000000 c7ab5cb0 00000000
c7ac7254 00000029 00010000
[ 45.796875] 5ba0: 60000093 c7ab5bb8 c00126d0 c0012708 60000093
ffffffff 00100104 00000817
[ 45.796875] 5bc0: c7ac7220 c0012878 00100104 c7ab5cb0 c7ace780
c7ac7220 00000817 c0012ae8
[ 45.796875] 5be0: 00100104 00000817 c7ab5cb0 00000817 00000007
00100104 c7ab5cb0 c027cfe0
[ 45.796875] 5c00: c029ad10 c039aa60 60000013 c00085a0 00000001
c02806d8 c7ad3b80 c00369ec
[ 45.796875] 5c20: c7ab0960 60000093 c7ab5c44 c0036af4 c7ac4000
00000001 0000000e c7ab0c18
[ 45.796875] 5c40: 00000002 c0025984 00000001 0000000e c7ab0960
00000001 c7ab0c48 c02806d8
[ 45.796875] 5c60: 00000000 c00260e0 0000000e 20000093 c02809b8
c78f54a0 c02809b8 c78f54a0
[ 45.796875] 5c80: c02809b8 c78f54a0 c7ab0c48 c02806d0 00000001
c0290c1a c004fd68 60000093
[ 45.796875] 5ca0: ffffffff c7ab5ce4 c0290b10 c000d498 00000001
00200200 00100100 00200200
[ 45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[ 45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093
ffffffff 00000041 c027e4a0
[ 45.796875] 5d00: 00000000 00020050 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[ 45.796875] 5d20: c7ab4000 00000000 00000000 00000000 c0296184
c0290558 00000100 00000050
[ 45.796875] 5d40: 01ffffff 00000000 80000013 c0290b10 00000000
00000000 c0290558 c00500bc
[ 45.796875] 5d60: 00000000 00000041 c0290558 00000000 c7ab5dd4
00000000 00000000 c0049100
[ 45.796875] 5d80: 00020050 00000012 00000000 c000e0d8 fefff000
c006c18c 60000013 c000d500
[ 45.796875] 5da0: c7ad9f60 c0290558 ffffffe0 c0281c70 c0281c5c
0000003c 80000013 c03995f4
[ 45.796875] 5dc0: 0000001e 00000000 00000020 c006c084 00000050
c006c1a4 0000003c 00000050
[ 45.796875] 5de0: 00000020 0000001c ffffffff c7b42220 ffffffff
c7ae2000 c029ff5c c7ae1fc0
[ 45.796875] 5e00: 00000000 c006c2b0 c7a73440 c0138430 ffffffff
c7a73440 c7b42220 c7ad2774
[ 45.796875] 5e20: c7ad2760 c0139afc 00000000 c7ad2760 7fffefff
00000000 c7ad2760 c7a73440
[ 45.796875] 5e40: 00000199 c7928380 c7ad276c 000000a0 00000000
c013c020 ffffffff 00000000
[ 45.796875] 5e60: c7ad2774 00000040 80000013 c0281c70 c7ad2774
c7ad2764 c7ad276c c7ad277c
[ 45.796875] 5e80: 00000040 000080d0 00000020 00000020 c7a73440
c7a738bc 00000140 fffffe00
[ 45.796875] 5ea0: c7a73440 00000000 00000000 c7928380 00000000
000000a0 00000000 c01317d8
[ 45.796875] 5ec0: c7a42bb0 c7a3bea8 00000002 00000000 00000000
c7ab5f78 00000001 bea1caf8
[ 45.796875] 5ee0: c7928380 bea1caf8 c7a3f4b0 00000003 c7ab4000
00000000 00000000 c0131fa8
[ 45.796875] 5f00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ad25a0 bea1caf8
[ 45.796875] 5f20: bea1caf8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[ 45.796875] 5f40: 00000003 c039a740 00000000 c004f75c 00000000
00000003 c7ad25a0 c7aba000
[ 45.796875] 5f60: c7ad25a8 c006c520 c027a224 c7ad25a0 bea1caf8
40186f40 00000003 c000d9c4
[ 45.796875] 5f80: c7ab4000 c007c66c 00000003 00000000 bea1caf8
bea1caf8 40186f40 00000003
[ 45.796875] 5fa0: 00000036 c000d860 bea1caf8 40186f40 00000003
40186f40 bea1caf8 00000000
[ 45.796875] 5fc0: bea1caf8 40186f40 00000003 00000036 00000003
bea1cdb4 00000000 00000000
[ 45.796875] 5fe0: b6f62ec4 bea1cab0 000098c8 b6f62f08 60000010
00000003 00000006 00000004
[ 45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c005063c>] (__get_free_pages+0x10/0x4c)
[ 45.796875] [<c005063c>] (__get_free_pages+0x10/0x4c) from
[<c0063e08>] (exit_mmap+0x94/0x19c)
[ 45.796875] [<c0063e08>] (exit_mmap+0x94/0x19c) from [<c00175a8>]
(mmput+0x38/0xa8)
[ 45.796875] [<c00175a8>] (mmput+0x38/0xa8) from [<c001c5bc>]
(exit_mm+0xe8/0xec)
[ 45.796875] [<c001c5bc>] (exit_mm+0xe8/0xec) from [<c001db5c>]
(do_exit+0x1d4/0x688)
[ 45.796875] [<c001db5c>] (do_exit+0x1d4/0x688) from [<c00109f4>]
(die+0x208/0x244)
[ 45.796875] [<c00109f4>] (die+0x208/0x244) from [<c0012888>]
(__do_kernel_fault+0x64/0x84)
[ 45.796875] [<c0012888>] (__do_kernel_fault+0x64/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[ 45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[ 45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[ 45.796875] Exception stack(0xc7ab5b70 to 0xc7ab5bb8)
[ 45.796875] 5b60: c0220df7
00000000 00000000 a0000000
[ 45.796875] 5b80: 00000100 00000000 00000000 c7ab5cb0 00000000
c7ac7254 00000029 00010000
[ 45.796875] 5ba0: 60000093 c7ab5bb8 c00126d0 c0012708 60000093 ffffffff
[ 45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c0012708>]
(show_pte+0x74/0xbc)
[ 45.796875] [<c0012708>] (show_pte+0x74/0xbc) from [<c0012878>]
(__do_kernel_fault+0x54/0x84)
[ 45.796875] [<c0012878>] (__do_kernel_fault+0x54/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[ 45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[ 45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[ 45.796875] Exception stack(0xc7ab5cb0 to 0xc7ab5cf8)
[ 45.796875] 5ca0: 00000001
00200200 00100100 00200200
[ 45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[ 45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093 ffffffff
[ 45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[ 45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 45.796875] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[ 45.796875] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c2b0>] (__kmalloc_node+0x30/0xa0)
[ 45.796875] [<c006c2b0>] (__kmalloc_node+0x30/0xa0) from
[<c0138430>] (schedule_erase+0x24/0x64)
[ 45.796875] [<c0138430>] (schedule_erase+0x24/0x64) from
[<c0139afc>] (ubi_wl_init+0x11c/0x36c)
[ 45.796875] [<c0139afc>] (ubi_wl_init+0x11c/0x36c) from
[<c013c020>] (ubi_attach+0x13e4/0x147c)
[ 45.796875] [<c013c020>] (ubi_attach+0x13e4/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[ 45.796875] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[ 45.796875] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[ 45.796875] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[ 45.796875] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[ 45.796875] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[ 45.796875] ---[ end trace 4f68e63fbfe364d7 ]---
[ 45.796875] Fixing recursive fault but reboot is needed!
[ 46.148437] Unable to handle kernel paging request at virtual
address 00100104
[ 46.148437] pgd = c0004000
[ 46.148437] [00100104] *pgd=00000000
[ 46.148437] Internal error: Oops: 817 [#5] ARM
[ 46.148437] CPU: 0 Tainted: G B D (3.6.0-rc1+ #893)
[ 46.148437] PC is at get_page_from_freelist+0x24c/0x4b8
[ 46.148437] LR is at zone_watermark_ok+0x18/0x1c
[ 46.148437] pc : [<c004fd68>] lr : [<c004dce0>] psr: 60000093
[ 46.148437] sp : c0273cc0 ip : 00000041 fp : 60000093
[ 46.148437] r10: c039aa60 r9 : c029ad10 r8 : c0290b10
[ 46.148437] r7 : 80000093 r6 : c0290558 r5 : c03ae04c r4 : 00000000
[ 46.148437] r3 : 00200200 r2 : 00100100 r1 : 00200200 r0 : 00000001
[ 46.148437] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM
Segment kernel
[ 46.148437] Control: 0005317f Table: 27ad8000 DAC: 00000017
[ 46.148437] Process swapper (pid: 0, stack limit = 0xc0272270)
[ 46.148437] Stack: (0xc0273cc0 to 0xc0274000)
[ 46.148437] 3cc0: 00000041 c7acf4a0 c0272000 00020020 00000001
00000008 c0290b14 00000000
[ 46.148437] 3ce0: ffffffff 00000000 c0272000 00000000 c7ace7b0
00000000 c0038dac c0290558
[ 46.148437] 3d00: c7ace780 00000020 01ffffff 00000000 80000093
c0290b10 00000000 00000000
[ 46.148437] 3d20: c0290558 c00500bc 00000000 00000041 c0290558
00000000 00000001 00000000
[ 46.148437] 3d40: c0273d74 c00308d8 00020020 c0036604 00000000
20000013 c7a4994c c7abb900
[ 46.148437] 3d60: 000000cc 00000060 c7a48a40 c0290558 fffffff8
c0281c70 c0281c5c 00000090
[ 46.148437] 3d80: 80000093 c03995f4 00000048 00000000 00000008
c006c084 00000020 c006c1a4
[ 46.148437] 3da0: 00000090 00000020 00000008 c7808b40 0000000e
c7ab0c18 c7ab0960 00000001
[ 46.148437] 3dc0: c02806d8 00000000 00000002 c006c4a8 c0297524
c0280098 0000000e c0024abc
[ 46.148437] 3de0: 00000001 00000001 0000000e c0025834 00000001
0000000e c7ab0960 00000001
[ 46.148437] 3e00: c7ab0c48 c02806d8 00000000 c00260e0 0000000e
20000093 c7ab0960 c7a8bfc0
[ 46.148437] 3e20: 00000001 0000000e c0280778 c00262d0 c02806d0
00000001 c0290c1a c001e6bc
[ 46.148437] 3e40: c001e6a4 c0033b20 00000000 c003bb9c 00000000
00000000 00000000 00000000
[ 46.148437] 3e60: 0000002e 0860173b ffc06c00 c027c058 00000000
c027e4a0 00000000 00000000
[ 46.148437] 3e80: c0290c20 c7ac7220 00000001 c00240f0 c027c058
c0024124 c0290fdc 0000008f
[ 46.148437] 3ea0: c027e4a0 c003ee50 c027e4a0 00000000 c0290fdc
0000008f c027e4a0 00000000
[ 46.148437] 3ec0: 00000000 c0016f10 c027e6a8 c78023c0 00000012
c0044dac c78023c0 c027e6a8
[ 46.148437] 3ee0: 0005d6d5 c78023c0 00000000 ffffffff c0273f64
c7ace780 c7ac7220 c7ac7220
[ 46.148437] 3f00: c0273f8c c0044f40 c78023c0 c0046fc4 00000012
c004485c 00000012 c000e0d4
[ 46.148437] 3f20: fefff000 c0036734 60000013 c000d500 c7ace780
00000000 00000000 60000013
[ 46.148437] 3f40: c7ace780 c7ac7220 00000002 c0272000 c7ace780
c7ac7220 c7ac7220 c0273f8c
[ 46.148437] 3f60: c7ab4044 c0273f78 c01d6ec0 c0036734 60000013
ffffffff c027c058 c02809b8
[ 46.148437] 3f80: 00000000 c0272000 c0273fb4 c01d6ec0 c027c058
c0272000 c027cd20 c0290d48
[ 46.148437] 3fa0: c03aca60 20004000 41069265 2026c3b0 00000000
c000e300 c027a090 ffffffff
[ 46.148437] 3fc0: c026d5ec c02566cc ffffffff ffffffff c02561cc
00000000 00000000 c026d5ec
[ 46.148437] 3fe0: 00000000 00053175 c027a01c c026d5bc c027cd14
20008040 00000000 00000000
[ 46.148437] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[ 46.148437] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[ 46.148437] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[ 46.148437] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64)
[ 46.148437] [<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64) from
[<c0024abc>] (__sigqueue_alloc+0x78/0x120)
[ 46.148437] [<c0024abc>] (__sigqueue_alloc+0x78/0x120) from
[<c0025834>] (__send_signal.clone.23+0xa4/0x214)
[ 46.148437] [<c0025834>] (__send_signal.clone.23+0xa4/0x214) from
[<c00260e0>] (do_send_sig_info+0x40/0x4c)
[ 46.148437] [<c00260e0>] (do_send_sig_info+0x40/0x4c) from
[<c00262d0>] (kill_pid_info+0x30/0x44)
[ 46.148437] [<c00262d0>] (kill_pid_info+0x30/0x44) from
[<c001e6bc>] (it_real_fn+0x18/0x20)
[ 46.148437] [<c001e6bc>] (it_real_fn+0x18/0x20) from [<c0033b20>]
(hrtimer_run_queues+0x12c/0x1e4)
[ 46.148437] [<c0033b20>] (hrtimer_run_queues+0x12c/0x1e4) from
[<c00240f0>] (run_local_timers+0x8/0x14)
[ 46.148437] [<c00240f0>] (run_local_timers+0x8/0x14) from
[<c0024124>] (update_process_times+0x28/0x48)
[ 46.148437] [<c0024124>] (update_process_times+0x28/0x48) from
[<c003ee50>] (tick_handle_periodic+0xc/0x74)
[ 46.148437] [<c003ee50>] (tick_handle_periodic+0xc/0x74) from
[<c0016f10>] (at91sam926x_pit_interrupt+0x7c/0xa8)
[ 46.148437] [<c0016f10>] (at91sam926x_pit_interrupt+0x7c/0xa8) from
[<c0044dac>] (handle_irq_event_percpu+0x30/0x19c)
[ 46.148437] [<c0044dac>] (handle_irq_event_percpu+0x30/0x19c) from
[<c0044f40>] (handle_irq_event+0x28/0x38)
[ 46.148437] [<c0044f40>] (handle_irq_event+0x28/0x38) from
[<c0046fc4>] (handle_fasteoi_irq+0x9c/0xdc)
[ 46.148437] [<c0046fc4>] (handle_fasteoi_irq+0x9c/0xdc) from
[<c004485c>] (generic_handle_irq+0x20/0x30)
[ 46.148437] [<c004485c>] (generic_handle_irq+0x20/0x30) from
[<c000e0d4>] (handle_IRQ+0x60/0x84)
[ 46.148437] [<c000e0d4>] (handle_IRQ+0x60/0x84) from [<c000d500>]
(__irq_svc+0x40/0x4c)
[ 46.148437] [<c000d500>] (__irq_svc+0x40/0x4c) from [<c0036734>]
(finish_task_switch.clone.52.clone.57+0x2c/0xe0)
[ 46.148437] [<c0036734>]
(finish_task_switch.clone.52.clone.57+0x2c/0xe0) from [<c01d6ec0>]
(__schedule+0x300/0x338)
[ 46.148437] [<c01d6ec0>] (__schedule+0x300/0x338) from [<c000e300>]
(cpu_idle+0xa4/0xb4)
[ 46.148437] [<c000e300>] (cpu_idle+0xa4/0xb4) from [<c02566cc>]
(start_kernel+0x240/0x280)
[ 46.148437] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[ 46.148437] ---[ end trace 4f68e63fbfe364d8 ]---
[ 46.148437] Kernel panic - not syncing: Fatal exception in interruptI attached the .config I used
Regards,
Richard.
Quoted 3 lines · Richard Genoud
I finally managed to reproduced it on linux-ubi/master + only one patch to make my board boot:
(I thought it needed much more code than that...)
Hmm, you use slob... I guess this is the reason, I do not see issues with slub. May be there is a bug which is revealed when slob is used? I'll need to try slob.
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/9/3 Artem Bityutskiy <[email protected]>:
Quoted 8 lines · Richard Genoud
Quoted 3 lines
I finally managed to reproduced it on linux-ubi/master + only one patch to make my board boot:
(I thought it needed much more code than that...)Hmm, you use slob... I guess this is the reason, I do not see issues with slub. May be there is a bug which is revealed when slob is used? I'll need to try slob.
Good call Artem !
I switched to slub and I can't reproduce it anymore.
drivers/mtd/ubi/vtbl.c retry: · line 352
Quoted 11 lines · Richard Genoud
drivers/mtd/ubi/vtbl.c +2
-0@@ -346,8 +346,8 @@ retry:*/ err =ubi_scan_add_used (ubi, si, new_seb->pnum, new_seb->ec, vid_hdr,0 ); +// kfree(new_seb); +// ubi_free_vid_hdr(ubi, vid_hdr); return err;
Richard, I've sent you the fix. I've tested it and it fixes the issue. Switching to SLUB must be hiding it somehow. Thanks for reporting!
Quoted 1 line
Signature · 2 lines
Best Regards, Artem Bityutskiy
Quoted 1 line · Richard Genoud
I tested also some values at limits, it seems all right.
Thanks Richard for testing. Would you be also energetic enough to do the last step - some documentation for mtd-www?
Signature · 2 lines
Best Regards, Artem Bityutskiy
2012/9/3 Artem Bityutskiy <[email protected]>:
Quoted 5 lines · Richard Genoud
Quoted 1 line
I tested also some values at limits, it seems all right.
Thanks Richard for testing. Would you be also energetic enough to do the last step - some documentation for mtd-www?
yep, that's next in line !