lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Jul 2016 01:39:03 +0000
From:	bugzilla-daemon@...zilla.kernel.org
To:	linux-ext4@...r.kernel.org
Subject: [Bug 124651] ext4 bugon panic when I mmap a file

https://bugzilla.kernel.org/show_bug.cgi?id=124651

--- Comment #2 from wangguang <35445233@...com> ---
fs/ext4/inode.c:2263:mpage_prepare_extent_to_map:

          2261:        lblk = ((ext4_lblk_t)page->index) <<
                (PAGE_CACHE_SHIFT - blkbits);
          2263:        head = page_buffers(page);



EXT4 BUG_ON page_buffers() because a page goes to writeback without
buffer-heads attached.

I think unmap_page_range set the page dirty again Cause the problem。

I can recurrent the bug by:
(1) mmap a file 
 addr = (char *)mmap(NULL, MAPLEN, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
 memset(addr, 'i', MAPLEN);
(2) return err at
ext4_writepages->mpage_map_and_submit_extent->mpage_map_one_extent  Cause the
log:
        ext4_msg(sb, KERN_CRIT,
                 "Delayed block allocation failed for "
                 "inode %lu at logical offset %llu with"
                 " max blocks %u with error %d",
                 inode->i_ino,
                 (unsigned long long)map->m_lblk,
                 (unsigned)map->m_len, -err);

(3) Unmap case warning:
WARNING: at fs/buffer.c:661 __set_page_dirty+0xaa/0xc0()

(4) wait for sync,then bugon

see the attachment please.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ