From: Lachlan McIlroy Date: Wed, 17 Sep 2008 06:52:13 +0000 (+1000) Subject: [XFS] Fix use-after-free with buffers X-Git-Tag: v2.6.27-rc7~8^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1f5dbd7077eebec794452a516cb02f1669b036d;p=pandora-kernel.git [XFS] Fix use-after-free with buffers We have a use-after-free issue where log completions access buffers via the buffer log item and the buffer has already been freed. Fix this by taking a reference on the buffer when attaching the buffer log item and release the hold when the buffer log item is detached and we no longer need the buffer. Also create a new function xfs_buf_item_free() to combine some common code. SGI-PV: 985757 SGI-Modid: xfs-linux-melb:xfs-kern:32025a Signed-off-by: Lachlan McIlroy Signed-off-by: Christoph Hellwig --- Reading git-diff-tree failed