diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-13 07:09:28 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-13 07:09:28 +0200 |
| commit | b60af0b9e752aa77f29daac026dd2314cc2a0bb0 (patch) | |
| tree | 8031a0c967858bc5f6dcdf058158541a1ded2fd6 /drivers/android/binder/allocation.rs | |
| parent | 1db5c6b0b9834aee2f14e39764becfcc29d09ccf (diff) | |
| parent | a13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff) | |
| download | linux-next-b60af0b9e752aa77f29daac026dd2314cc2a0bb0.tar.gz linux-next-b60af0b9e752aa77f29daac026dd2314cc2a0bb0.zip | |
Merge 7.2-rc3 into usb-next
We need the USB fixes in here as well to build on top of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder/allocation.rs')
| -rw-r--r-- | drivers/android/binder/allocation.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/android/binder/allocation.rs b/drivers/android/binder/allocation.rs index b7b05e72970a..ea5846e4da16 100644 --- a/drivers/android/binder/allocation.rs +++ b/drivers/android/binder/allocation.rs @@ -259,7 +259,7 @@ impl Drop for Allocation { if let Some(offsets) = info.offsets.clone() { let view = AllocationView::new(self, offsets.start); - for i in offsets.step_by(size_of::<usize>()) { + for i in offsets.step_by(size_of::<u64>()) { if view.cleanup_object(i).is_err() { pr_warn!("Error cleaning up object at offset {}\n", i) } @@ -420,7 +420,8 @@ impl<'a> AllocationView<'a> { } fn cleanup_object(&self, index_offset: usize) -> Result { - let offset = self.alloc.read(index_offset)?; + let offset = self.alloc.read::<u64>(index_offset)?; + let offset: usize = offset.try_into().map_err(|_| EINVAL)?; let header = self.read::<BinderObjectHeader>(offset)?; match header.type_ { BINDER_TYPE_WEAK_BINDER | BINDER_TYPE_BINDER => { |
