forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit8d4d9c7
Colin Ian King
Peter Zijlstra
sched/debug: Fix memory corruption caused by multiple small reads of flags
Reading /proc/sys/kernel/sched_domain/cpu*/domain0/flags mutliple timeswith small reads causes oopses with slub corruption issues because the kfree isfree'ing an offset from a previous allocation. Fix this by adding in a newpointer 'buf' for the allocation and kfree and use the temporary pointer tmpto handle memory copies of the buf offsets.Fixes:5b9f8ff ("sched/debug: Output SD flag names rather than their values")Reported-by: Jeff Bastian <jbastian@redhat.com>Signed-off-by: Colin Ian King <colin.king@canonical.com>Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>Link:https://lkml.kernel.org/r/20201029151103.373410-1-colin.king@canonical.com1 parentb4c9c9f commit8d4d9c7
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
0 commit comments
Comments
(0)