Commit 227b55a7 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by T.J. Mercier
Browse files

ANDROID: dma-buf: don't re-purpose kobject as work_struct



The commit 5aec776e ("BACKPORT: ANDROID: dma-buf: Move sysfs work
out of DMA-BUF export path) re-purposed kobject as work_struct temporarily
to create the sysfs entries asynchronously. The author knows what he is
doing and rightly added a build assert if kobject struct size is smaller than
the work_struct size. We are hitting this build assert on a non-GKI platform
where CONFIG_ANDROID_KABI_RESERVE is not set. Fix this problem by allocating
a new union with dma_buf_sysfs_entry structure and temporary structure as
members. We only end up allocating more memory (because of union) only when
kobject size is smaller than work_struct which the original patch any way
assumed would never be true.

Bug: 261818147
Bug: 262666413
Change-Id: Ifb089bf80d8a3a44ece9f05fc0b99ee76cb11645
Signed-off-by: default avatarPavankumar Kondeti <quic_pkondeti@quicinc.com>
(cherry picked from commit ce18af9b)
Signed-off-by: default avatarT.J. Mercier <tjmercier@google.com>
parent c1b1201d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment