Commit 310a4a9
Bartosz Golaszewski
gpio: shared: shorten the critical section in gpiochip_setup_shared()
Commit 710abda ("gpio: shared: call gpio_chip::of_xlate() if set")
introduced a critical section around the adjustmenet of entry->offset.
However this may cause a deadlock if we create the auxiliary shared
proxy devices with this lock taken. We only need to protect
entry->offset while it's read/written so shorten the critical section
and release the lock before creating the proxy device as the field in
question is no longer accessed at this point.
Fixes: 710abda ("gpio: shared: call gpio_chip::of_xlate() if set")
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260325-gpio-shared-deadlock-v1-1-e4e7a5319e95@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>1 parent c720fb5 commit 310a4a9
1 file changed
Lines changed: 28 additions & 28 deletions
File tree
- drivers/gpio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | 536 | | |
539 | 537 | | |
540 | 538 | | |
541 | 539 | | |
542 | 540 | | |
543 | 541 | | |
| 542 | + | |
544 | 543 | | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
551 | 550 | | |
552 | | - | |
553 | | - | |
554 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
555 | 554 | | |
556 | | - | |
557 | | - | |
558 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
559 | 558 | | |
560 | | - | |
561 | | - | |
| 559 | + | |
| 560 | + | |
562 | 561 | | |
563 | 562 | | |
564 | | - | |
| 563 | + | |
565 | 564 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
575 | 574 | | |
576 | | - | |
577 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| |||
0 commit comments