aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorGravatar Eli Cohen <elic@nvidia.com> 2023-02-14 09:29:46 +0200
committerGravatar Saeed Mahameed <saeedm@nvidia.com> 2023-03-24 16:04:10 -0700
commit9821d8d4628e630ab56f47a8e6b878a2576e069b (patch)
tree06cbe34a046e0ec777302047d7b710b724f6f73e /block
parentlib: cpu_rmap: Avoid use after free on rmap->obj array entries (diff)
downloadlinux-9821d8d4628e630ab56f47a8e6b878a2576e069b.tar.gz
linux-9821d8d4628e630ab56f47a8e6b878a2576e069b.tar.bz2
linux-9821d8d4628e630ab56f47a8e6b878a2576e069b.zip
lib: cpu_rmap: Use allocator for rmap entries
Use a proper allocator for rmap entries using a naive for loop. The allocator relies on whether an entry is NULL to be considered free. Remove the used field of rmap which is not needed. Also, avoid crashing the kernel if an entry is not available. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Eli Cohen <elic@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions