diff options
author | Bob Peterson <rpeterso@redhat.com> | 2013-12-13 08:31:06 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-12-13 21:42:40 +0000 |
commit | 502be2a32f09f388e4ff34ef2e3ebcabbbb261da (patch) | |
tree | ea89d072b44346858e3fa5eb06652675e7e1b6ff /drivers/char/lp.c | |
parent | 9290a9a7c0bcf5400e8dbfbf9707fa68ea3fb338 (diff) | |
download | linux-stable-502be2a32f09f388e4ff34ef2e3ebcabbbb261da.tar.gz linux-stable-502be2a32f09f388e4ff34ef2e3ebcabbbb261da.tar.bz2 linux-stable-502be2a32f09f388e4ff34ef2e3ebcabbbb261da.zip |
GFS2: Fix slab memory leak in gfs2_bufdata
This patch fixes a slab memory leak that sometimes can occur
for files with a very short lifespan. The problem occurs when
a dinode is deleted before it has gotten to the journal properly.
In the leak scenario, the bd object is pinned for journal
committment (queued to the metadata buffers queue: sd_log_le_buf)
but is subsequently unpinned and dequeued before it finds its way
to the ail or the revoke queue. In this rare circumstance, the bd
object needs to be freed from slab memory, or it is forgotten.
We have to be very careful how we do it, though, because
multiple processes can call gfs2_remove_from_journal. In order to
avoid double-frees, only the process that does the unpinning is
allowed to free the bd.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'drivers/char/lp.c')
0 files changed, 0 insertions, 0 deletions