Commit decfa49
Use mutex_trylock for i2c adapter or MUX lock.
Problem:
There're multiple requests and the first request acquires the kernel
mutex lock and the 2nd request will be blocked by this mutex.
mctp-demux-daemon will be blocked, too and can't process any
further requests and responses. This is a deadlock problem.
mctp-demux-daemon will be unblocked until kernel timeout handler
happened.
Changes:
Use mutex_trylock and return EIO if the lock is acquired.
Tested:
check if MCTP requests or responses of NVNe/BF3 are handled successfully.
check RF storage APIs.
Fixes jira https://jirasw.nvidia.com/browse/DGXOPENBMC-13845
Signed-off-by: MarsYang <[email protected]>1 parent c504d19 commit decfa49
2 files changed
+51
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
1506 | | - | |
| 1506 | + | |
1507 | 1507 | | |
1508 | | - | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1509 | 1514 | | |
| 1515 | + | |
1510 | 1516 | | |
1511 | 1517 | | |
1512 | 1518 | | |
| |||
1521 | 1527 | | |
1522 | 1528 | | |
1523 | 1529 | | |
| 1530 | + | |
1524 | 1531 | | |
1525 | 1532 | | |
1526 | 1533 | | |
| |||
2271 | 2278 | | |
2272 | 2279 | | |
2273 | 2280 | | |
2274 | | - | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2275 | 2284 | | |
2276 | 2285 | | |
2277 | 2286 | | |
2278 | 2287 | | |
2279 | 2288 | | |
2280 | 2289 | | |
2281 | 2290 | | |
2282 | | - | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
2283 | 2294 | | |
2284 | 2295 | | |
2285 | 2296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
83 | 93 | | |
84 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
85 | 97 | | |
86 | 98 | | |
87 | 99 | | |
| |||
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
121 | 136 | | |
122 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
123 | 140 | | |
124 | 141 | | |
125 | 142 | | |
| |||
153 | 170 | | |
154 | 171 | | |
155 | 172 | | |
| 173 | + | |
156 | 174 | | |
157 | 175 | | |
158 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
159 | 179 | | |
160 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
161 | 183 | | |
162 | 184 | | |
163 | 185 | | |
| |||
194 | 216 | | |
195 | 217 | | |
196 | 218 | | |
197 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
198 | 222 | | |
199 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
200 | 226 | | |
201 | 227 | | |
202 | 228 | | |
| |||
0 commit comments