Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-extras: Commit

system/extras


Commit MetaInfo

Révision0caea84cc9cedd65b661e6f1308c4470ce41ea6a (tree)
l'heure2017-06-09 11:41:14
Auteurzhang sanshan <sanshan.zhang@nxp....>
CommiterChih-Wei Huang

Message de Log

Fix kernel panic when boot up

Kernel will panic with below log after factory reset:
EXT4-fs error (device mmcblk1p4): ext4_validate_block_bitmap:380: comm init: bg 17: block 557056: invalid block bitmap
Aborting journal on device mmcblk1p4-8.
Kernel panic - not syncing: EXT4-fs (device mmcblk1p4): panic forced after error
Rebooting in 5 seconds.

The root cause is the data type conversion issue on 32 bit devices.
When a 32-bit data mutiply a 32-bit data, it will still get a 32-bit data.
The 64-bit offset will be cut to 32 bit.

Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>

Change Summary

Modification

--- a/ext4_utils/ext4_utils.c
+++ b/ext4_utils/ext4_utils.c
@@ -177,7 +177,7 @@ static void block_device_write_sb(int fd)
177177 /* write out the backup superblocks */
178178 for (i = 1; i < aux_info.groups; i++) {
179179 if (ext4_bg_has_super_block(i)) {
180- offset = info.block_size * (aux_info.first_data_block
180+ offset = (unsigned long long)info.block_size * (aux_info.first_data_block
181181 + i * info.blocks_per_group);
182182 write_sb(fd, offset, aux_info.backup_sb[i]);
183183 }
Afficher sur ancien navigateur de dépôt.