Repository navigation
Commit c7c6eff
netconsole: fix multiple race conditions
In every netconsole option that can be set through configfs there's a
race when checking for nt->enabled since it can be modified at the same
time. Probably the most damage can be done by store_enabled when racing
with another instance of itself. Fix all the races with one stone by
moving the mutex lock around the ->store call for all options.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 45e526e commit c7c6eff
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | 328 | | |
330 | | - | |
331 | 329 | | |
332 | 330 | | |
333 | 331 | | |
334 | 332 | | |
335 | 333 | | |
336 | 334 | | |
337 | 335 | | |
338 | | - | |
339 | | - | |
| 336 | + | |
340 | 337 | | |
341 | | - | |
342 | 338 | | |
343 | 339 | | |
344 | | - | |
345 | 340 | | |
346 | 341 | | |
347 | 342 | | |
| |||
354 | 349 | | |
355 | 350 | | |
356 | 351 | | |
357 | | - | |
358 | 352 | | |
359 | 353 | | |
360 | 354 | | |
| |||
571 | 565 | | |
572 | 566 | | |
573 | 567 | | |
| 568 | + | |
574 | 569 | | |
575 | 570 | | |
| 571 | + | |
576 | 572 | | |
577 | 573 | | |
578 | 574 | | |
| |||
0 commit comments