android_kernel_samsung_msm8226/fs/jbd2
Theodore Ts'o afe69a8fc2 jbd2: don't mark block as modified if the handle is out of credits
commit e09463f220ca9a1a1ecfda84fcda658f99a1f12a upstream.

Do not set the b_modified flag in block's journal head should not
until after we're sure that jbd2_journal_dirty_metadat() will not
abort with an error due to there not being enough space reserved in
the jbd2 handle.

Otherwise, future attempts to modify the buffer may lead a large
number of spurious errors and warnings.

This addresses CVE-2018-10883.

https://bugzilla.kernel.org/show_bug.cgi?id=200071

Change-Id: Id8501e9b600fb35003f6cb9951cc187c1ad5801f
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[bwh: Backported to 3.16: Drop the added logging statement, as it's on
 a code path that doesn't exist here]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2020-01-06 08:40:36 +01:00
..
Kconfig
Makefile
checkpoint.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
commit.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
journal.c Merge tag 'v3.4.113' into lineage-16.0 2019-08-05 14:20:47 +02:00
recovery.c
revoke.c misc: Import SM-G900H kernel source code 2019-08-02 15:14:10 +02:00
transaction.c jbd2: don't mark block as modified if the handle is out of credits 2020-01-06 08:40:36 +01:00