Char/Misc driver fixes for 6.8-rc3

Here are three tiny driver fixes for 6.8-rc3.  They include:
   - Android binder long-term bug with epoll finally being fixed
   - fastrpc driver shutdown bugfix
   - open-dice lockdep fix
 
 All of these have been in linux-next this week with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZb6yeA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yktLwCgwz0RakMt9dqjbip/1NJAXaRlOAgAoLWeyBLt
 qBVv8Y50No3dxCuKbsJZ
 =fqm2
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are three tiny driver fixes for 6.8-rc3.  They include:

   - Android binder long-term bug with epoll finally being fixed

   - fastrpc driver shutdown bugfix

   - open-dice lockdep fix

  All of these have been in linux-next this week with no reported
  issues"

* tag 'char-misc-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  binder: signal epoll threads of self-work
  misc: open-dice: Fix spurious lockdep warning
  misc: fastrpc: Mark all sessions as invalid in cb_remove
This commit is contained in:
Linus Torvalds 2024-02-04 07:01:39 +00:00
commit 3a0e922079
3 changed files with 12 additions and 2 deletions

View File

@ -478,6 +478,16 @@ binder_enqueue_thread_work_ilocked(struct binder_thread *thread,
{ {
WARN_ON(!list_empty(&thread->waiting_thread_node)); WARN_ON(!list_empty(&thread->waiting_thread_node));
binder_enqueue_work_ilocked(work, &thread->todo); binder_enqueue_work_ilocked(work, &thread->todo);
/* (e)poll-based threads require an explicit wakeup signal when
* queuing their own work; they rely on these events to consume
* messages without I/O block. Without it, threads risk waiting
* indefinitely without handling the work.
*/
if (thread->looper & BINDER_LOOPER_STATE_POLL &&
thread->pid == current->pid && !thread->process_todo)
wake_up_interruptible_sync(&thread->wait);
thread->process_todo = true; thread->process_todo = true;
} }

View File

@ -2191,7 +2191,7 @@ static int fastrpc_cb_remove(struct platform_device *pdev)
int i; int i;
spin_lock_irqsave(&cctx->lock, flags); spin_lock_irqsave(&cctx->lock, flags);
for (i = 1; i < FASTRPC_MAX_SESSIONS; i++) { for (i = 0; i < FASTRPC_MAX_SESSIONS; i++) {
if (cctx->session[i].sid == sess->sid) { if (cctx->session[i].sid == sess->sid) {
cctx->session[i].valid = false; cctx->session[i].valid = false;
cctx->sesscount--; cctx->sesscount--;

View File

@ -140,7 +140,6 @@ static int __init open_dice_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
*drvdata = (struct open_dice_drvdata){ *drvdata = (struct open_dice_drvdata){
.lock = __MUTEX_INITIALIZER(drvdata->lock),
.rmem = rmem, .rmem = rmem,
.misc = (struct miscdevice){ .misc = (struct miscdevice){
.parent = dev, .parent = dev,
@ -150,6 +149,7 @@ static int __init open_dice_probe(struct platform_device *pdev)
.mode = 0600, .mode = 0600,
}, },
}; };
mutex_init(&drvdata->lock);
/* Index overflow check not needed, misc_register() will fail. */ /* Index overflow check not needed, misc_register() will fail. */
snprintf(drvdata->name, sizeof(drvdata->name), DRIVER_NAME"%u", dev_idx++); snprintf(drvdata->name, sizeof(drvdata->name), DRIVER_NAME"%u", dev_idx++);