Commit b344908
Bartosz Golaszewski
gpio: cdev: sanitize the label before requesting the interrupt
When an interrupt is requested, a procfs directory is created under
"/proc/irq/<irqnum>/<label>" where <label> is the string passed to one of
the request_irq() variants.
What follows is that the string must not contain the "/" character or
the procfs mkdir operation will fail. We don't have such constraints for
GPIO consumer labels which are used verbatim as interrupt labels for
GPIO irqs. We must therefore sanitize the consumer string before
requesting the interrupt.
Let's replace all "/" with ":".
Cc: [email protected]
Reported-by: Stefan Wahren <[email protected]>
Closes: https://lore.kernel.org/linux-gpio/[email protected]/
Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Kent Gibson <[email protected]>1 parent 4cece76 commit b344908
1 file changed
+32
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1086 | 1096 | | |
1087 | 1097 | | |
1088 | 1098 | | |
1089 | | - | |
| 1099 | + | |
1090 | 1100 | | |
1091 | 1101 | | |
1092 | 1102 | | |
| |||
1110 | 1120 | | |
1111 | 1121 | | |
1112 | 1122 | | |
| 1123 | + | |
1113 | 1124 | | |
1114 | 1125 | | |
1115 | 1126 | | |
| |||
1146 | 1157 | | |
1147 | 1158 | | |
1148 | 1159 | | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1149 | 1164 | | |
1150 | 1165 | | |
1151 | | - | |
1152 | | - | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1153 | 1169 | | |
| 1170 | + | |
1154 | 1171 | | |
1155 | 1172 | | |
1156 | 1173 | | |
| |||
1973 | 1990 | | |
1974 | 1991 | | |
1975 | 1992 | | |
1976 | | - | |
| 1993 | + | |
1977 | 1994 | | |
1978 | 1995 | | |
1979 | 1996 | | |
| |||
2114 | 2131 | | |
2115 | 2132 | | |
2116 | 2133 | | |
| 2134 | + | |
2117 | 2135 | | |
2118 | 2136 | | |
2119 | 2137 | | |
| |||
2198 | 2216 | | |
2199 | 2217 | | |
2200 | 2218 | | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
2201 | 2225 | | |
2202 | 2226 | | |
2203 | 2227 | | |
2204 | 2228 | | |
2205 | 2229 | | |
2206 | | - | |
| 2230 | + | |
2207 | 2231 | | |
2208 | | - | |
| 2232 | + | |
| 2233 | + | |
2209 | 2234 | | |
| 2235 | + | |
2210 | 2236 | | |
2211 | 2237 | | |
2212 | 2238 | | |
| |||
0 commit comments