Skip to contentSkip to conversation

PARTIAL TAKE 976035 - Prevent xfs_bmap_check_leaf_extents() from referencing unmapped memory.

DISCUSSION Lachlan McIlroy 1 participant 1 message Mar 26, 2008

lore
Share & tools
lore
#0 lore raw

Prevent xfs_bmap_check_leaf_extents() from referencing unmapped memory.

While investigating the extent corruption bug I ran into this bug in debug only code. xfs_bmap_check_leaf_extents() loops through the leaf blocks of the extent btree checking that every extent is entirely before the next extent. It also compares the last extent in the previous block to the first extent in the current block when the previous block has been released and potentially unmapped. So take a copy of the last extent instead of a pointer. Also move the last extent check out of the loop because we only need to do it once.

Date:  Wed Mar 26 17:53:07 AEDT 2008
Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-xfs
Inspected by:  hch
Author:  lachlan

The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb

Modid: xfs-linux-melb:xfs-kern:30718a
fs/xfs/xfs_bmap.c - 1.387 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.387&r2=text&tr2=1.386&f=h
- Prevent xfs_bmap_check_leaf_extents() from referencing unmapped memory.