Commit eb56d7e
Input: synaptics - fix crash when enabling pass-through port
BugLink: https://bugs.launchpad.net/bugs/2106494
[ Upstream commit 08bd5b7 ]
When enabling a pass-through port an interrupt might come before psmouse
driver binds to the pass-through port. However synaptics sub-driver
tries to access psmouse instance presumably associated with the
pass-through port to figure out if only 1 byte of response or entire
protocol packet needs to be forwarded to the pass-through port and may
crash if psmouse instance has not been attached to the port yet.
Fix the crash by introducing open() and close() methods for the port and
check if the port is open before trying to access psmouse instance.
Because psmouse calls serio_open() only after attaching psmouse instance
to serio port instance this prevents the potential crash.
Reported-by: Takashi Iwai <[email protected]>
Fixes: 100e169 ("Input: libps2 - attach ps2dev instances as serio port's drvdata")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1219522
Cc: [email protected]
Reviewed-by: Takashi Iwai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Noah Wager <[email protected]>
Signed-off-by: Mehmet Basaran <[email protected]>1 parent 7c42b41 commit eb56d7e
2 files changed
+43
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
670 | 690 | | |
671 | 691 | | |
672 | 692 | | |
673 | 693 | | |
674 | 694 | | |
675 | | - | |
| 695 | + | |
676 | 696 | | |
677 | | - | |
| 697 | + | |
678 | 698 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
687 | 714 | | |
688 | 715 | | |
689 | 716 | | |
| |||
722 | 749 | | |
723 | 750 | | |
724 | 751 | | |
| 752 | + | |
| 753 | + | |
725 | 754 | | |
726 | 755 | | |
727 | 756 | | |
| |||
1218 | 1247 | | |
1219 | 1248 | | |
1220 | 1249 | | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
| 1250 | + | |
| 1251 | + | |
1225 | 1252 | | |
| 1253 | + | |
1226 | 1254 | | |
1227 | 1255 | | |
1228 | 1256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments