Commit 8309234
gpio: cdev: fix missed label sanitizing in debounce_setup()
When adding sanitization of the label, the path through
edge_detector_setup() that leads to debounce_setup() was overlooked.
A request taking this path does not allocate a new label and the
request label is freed twice when the request is released, resulting
in memory corruption.
Add label sanitization to debounce_setup().
Cc: stable@vger.kernel.org
Fixes: b344908 ("gpio: cdev: sanitize the label before requesting the interrupt")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
[Bartosz: rebased on top of the fix for empty GPIO labels]
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>1 parent b3b9596 commit 8309234
1 file changed
Lines changed: 28 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
731 | 750 | | |
732 | 751 | | |
733 | 752 | | |
| |||
1015 | 1034 | | |
1016 | 1035 | | |
1017 | 1036 | | |
| 1037 | + | |
1018 | 1038 | | |
1019 | 1039 | | |
1020 | 1040 | | |
| |||
1037 | 1057 | | |
1038 | 1058 | | |
1039 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1040 | 1064 | | |
1041 | 1065 | | |
1042 | | - | |
1043 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1044 | 1069 | | |
| 1070 | + | |
1045 | 1071 | | |
1046 | 1072 | | |
1047 | 1073 | | |
| |||
1083 | 1109 | | |
1084 | 1110 | | |
1085 | 1111 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | 1112 | | |
1106 | 1113 | | |
1107 | 1114 | | |
| |||
0 commit comments