linux/fs/xfs/linux-2.6
Dave Chinner 44396476a0 xfs: reset buffer pointers before freeing them
When we free a vmapped buffer, we need to ensure the vmap address
and length we free is the same as when it was allocated. In various
places in the log code we change the memory the buffer is pointing
to before issuing IO, but we never reset the buffer to point back to
it's original memory (or no memory, if that is the case for the
buffer).

As a result, when we free the buffer it points to memory that is
owned by something else and attempts to unmap and free it. Because
the range does not match any known mapped range, it can trigger
BUG_ON() traps in the vmap code, and potentially corrupt the vmap
area tracking.

Fix this by always resetting these buffers to their original state
before freeing them.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-05-19 12:03:45 -05:00
..
kmem.c xfs: Convert linux-2.6/ files to new logging interface 2011-03-07 10:00:35 +11:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h
time.h
xfs_acl.c xfs: provide simple rcu-walk ACL implementation 2011-01-07 17:50:30 +11:00
xfs_aops.c Fix common misspellings 2011-03-31 11:26:23 -03:00
xfs_aops.h xfs: kill xfs_iomap 2010-12-16 16:05:51 -06:00
xfs_buf.c xfs: reset buffer pointers before freeing them 2011-05-19 12:03:45 -05:00
xfs_buf.h xfs: reset buffer pointers before freeing them 2011-05-19 12:03:45 -05:00
xfs_discard.c xfs: check if device support discard in xfs_ioc_trim() 2011-02-22 15:08:44 -06:00
xfs_discard.h xfs: add FITRIM support 2011-01-11 20:28:29 -06:00
xfs_export.c exportfs: Return the minimum required handle size 2011-03-14 09:15:28 -04:00
xfs_export.h
xfs_file.c Fix common misspellings 2011-03-31 11:26:23 -03:00
xfs_fs_subr.c xfs: use range primitives for xfs page cache operations 2010-10-18 15:07:24 -05:00
xfs_globals.c xfs: remove xfs_cred.h 2010-10-18 15:08:06 -05:00
xfs_ioctl.c xfs: preallocation transactions do not need to be synchronous 2011-03-26 09:13:08 +11:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_ioctl32.c xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE 2011-04-28 13:27:46 -05:00
xfs_ioctl32.h xfs: add an x86 compat handler for XFS_IOC_ZERO_RANGE 2011-04-28 13:27:46 -05:00
xfs_iops.c Fix common misspellings 2011-03-31 11:26:23 -03:00
xfs_iops.h
xfs_linux.h xfs: reduce the number of pagb_lock roundtrips in xfs_alloc_clear_busy 2011-04-28 13:18:09 -05:00
xfs_message.c xfs: kill off xfs_printk() 2011-05-19 11:38:09 -05:00
xfs_message.h xfs: kill off xfs_printk() 2011-05-19 11:38:09 -05:00
xfs_quotaops.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2010-08-07 12:57:07 -07:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h
xfs_super.c xfs: fix duplicate workqueue initialisation 2011-05-19 12:03:24 -05:00
xfs_super.h xfs: remove xfs_version.h 2010-10-18 15:08:04 -05:00
xfs_sync.c xfs: avoid getting stuck during async inode flushes 2011-05-19 12:03:42 -05:00
xfs_sync.h xfs: introduce a xfssyncd workqueue 2011-04-08 12:45:07 +10:00
xfs_sysctl.c xfs: Convert linux-2.6/ files to new logging interface 2011-03-07 10:00:35 +11:00
xfs_sysctl.h
xfs_trace.c xfs: remove unneeded #include statements 2010-07-26 13:16:33 -05:00
xfs_trace.h xfs: fix compiler warning in xfs_trace.h 2011-04-28 13:27:06 -05:00
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00