summaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-08-23 17:47:28 -0400
committerBen Hutchings <ben@decadent.org.uk>2014-11-05 20:27:47 +0000
commit4c84431245882b69537e78fea5f1686c35ddd9f9 (patch)
tree4b8f4d3b07482ee6355a076a4ee5d29b96e33231 /net/ipv6/udp.c
parenta0a8667a54a43250f962bf778c031c50c31e9142 (diff)
ext4: fix BUG_ON in mb_free_blocks()
commit c99d1e6e83b06744c75d9f5e491ed495a7086b7b upstream. If we suffer a block allocation failure (for example due to a memory allocation failure), it's possible that we will call ext4_discard_allocated_blocks() before we've actually allocated any blocks. In that case, fe_len and fe_start in ac->ac_f_ex will still be zero, and this will result in mb_free_blocks(inode, e4b, 0, 0) triggering the BUG_ON on mb_free_blocks(): BUG_ON(last >= (sb->s_blocksize << 3)); Fix this by bailing out of ext4_discard_allocated_blocks() if fs_len is zero. Also fix a missing ext4_mb_unload_buddy() call in ext4_discard_allocated_blocks(). Google-Bug-Id: 16844242 Fixes: 86f0afd463215fc3e58020493482faa4ac3a4d69 Signed-off-by: Theodore Ts'o <tytso@mit.edu> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/ipv6/udp.c')
0 files changed, 0 insertions, 0 deletions