RE: [char-misc] mei: replace spinlock with mutex for kvfree

From: Usyskin, Alexander

Date: Thu Jul 02 2026 - 01:53:41 EST


> Subject: [char-misc] mei: replace spinlock with mutex for kvfree
>
> The read buffer allocation that protected by spinlock was
> changed from kmalloc() to kvmalloc().
> This buffer is part of structure protected by spinlock.
> That leads to errors like below when freeing buffer
> that allocated non-contiguous:
>
> BUG: sleeping function called from invalid context at mm/vmalloc.c:3448
>
> Replace spinlock with mutex to allow non-contiguous free that can wait.
>

Greg, please do not merge this.
There is a problem with this approach, may lead to bugcheck.
Will provide another patch to fix this.

- -
Thanks,
Sasha