Commit d7c36d6
locking/lockdep: Avoid struct return in lock_stats()
Returning a large structure from the lock_stats() function causes clang
to have multiple copies of it on the stack and copy between them, which
can end up exceeding the frame size warning limit:
kernel/locking/lockdep.c:300:25: error: stack frame size (1464) exceeds limit (1280) in 'lock_stats' [-Werror,-Wframe-larger-than]
300 | struct lock_class_stats lock_stats(struct lock_class *class)
Change the calling conventions to directly operate on the caller's copy,
which apparently is what gcc does already.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20250610092941.2642847-1-arnd@kernel.org1 parent f84a15b commit d7c36d6
File tree
3 files changed
+14
-17
lines changed- include/linux
- kernel/locking
3 files changed
+14
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | | - | |
303 | 302 | | |
304 | 303 | | |
305 | | - | |
| 304 | + | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
310 | | - | |
311 | | - | |
| 309 | + | |
| 310 | + | |
312 | 311 | | |
313 | | - | |
314 | | - | |
| 312 | + | |
| 313 | + | |
315 | 314 | | |
316 | | - | |
317 | | - | |
| 315 | + | |
| 316 | + | |
318 | 317 | | |
319 | | - | |
320 | | - | |
| 318 | + | |
| 319 | + | |
321 | 320 | | |
322 | | - | |
323 | | - | |
| 321 | + | |
| 322 | + | |
324 | 323 | | |
325 | | - | |
326 | | - | |
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | | - | |
| 660 | + | |
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| |||
0 commit comments