Skip to content

Commit 3a0e922

Browse files
committed
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
2 parents 0214960 + 97830f3 commit 3a0e922

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

drivers/android/binder.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,16 @@ binder_enqueue_thread_work_ilocked(struct binder_thread *thread,
478478
{
479479
WARN_ON(!list_empty(&thread->waiting_thread_node));
480480
binder_enqueue_work_ilocked(work, &thread->todo);
481+
482+
/* (e)poll-based threads require an explicit wakeup signal when
483+
* queuing their own work; they rely on these events to consume
484+
* messages without I/O block. Without it, threads risk waiting
485+
* indefinitely without handling the work.
486+
*/
487+
if (thread->looper & BINDER_LOOPER_STATE_POLL &&
488+
thread->pid == current->pid && !thread->process_todo)
489+
wake_up_interruptible_sync(&thread->wait);
490+
481491
thread->process_todo = true;
482492
}
483493

drivers/misc/fastrpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ static int fastrpc_cb_remove(struct platform_device *pdev)
21912191
int i;
21922192

21932193
spin_lock_irqsave(&cctx->lock, flags);
2194-
for (i = 1; i < FASTRPC_MAX_SESSIONS; i++) {
2194+
for (i = 0; i < FASTRPC_MAX_SESSIONS; i++) {
21952195
if (cctx->session[i].sid == sess->sid) {
21962196
cctx->session[i].valid = false;
21972197
cctx->sesscount--;

drivers/misc/open-dice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ static int __init open_dice_probe(struct platform_device *pdev)
140140
return -ENOMEM;
141141

142142
*drvdata = (struct open_dice_drvdata){
143-
.lock = __MUTEX_INITIALIZER(drvdata->lock),
144143
.rmem = rmem,
145144
.misc = (struct miscdevice){
146145
.parent = dev,
@@ -150,6 +149,7 @@ static int __init open_dice_probe(struct platform_device *pdev)
150149
.mode = 0600,
151150
},
152151
};
152+
mutex_init(&drvdata->lock);
153153

154154
/* Index overflow check not needed, misc_register() will fail. */
155155
snprintf(drvdata->name, sizeof(drvdata->name), DRIVER_NAME"%u", dev_idx++);

0 commit comments

Comments
 (0)