mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
btrfs: convert extent_map.refs from atomic_t to refcount_t
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova <elena.reshetova@intel.com> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David Windsor <dwindsor@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9b64f57ddf
commit
490b54d6fb
6 changed files with 12 additions and 11 deletions
|
|
@ -213,7 +213,7 @@ TRACE_EVENT_CONDITION(btrfs_get_extent,
|
|||
__entry->block_start = map->block_start;
|
||||
__entry->block_len = map->block_len;
|
||||
__entry->flags = map->flags;
|
||||
__entry->refs = atomic_read(&map->refs);
|
||||
__entry->refs = refcount_read(&map->refs);
|
||||
__entry->compress_type = map->compress_type;
|
||||
),
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue