.. | .. |
---|
2279 | 2279 | char type, u64 start) |
---|
2280 | 2280 | { |
---|
2281 | 2281 | struct sym_args *args = arg; |
---|
| 2282 | + u64 size; |
---|
2282 | 2283 | |
---|
2283 | 2284 | if (!kallsyms__is_function(type)) |
---|
2284 | 2285 | return 0; |
---|
.. | .. |
---|
2288 | 2289 | args->start = start; |
---|
2289 | 2290 | } |
---|
2290 | 2291 | /* Don't know exactly where the kernel ends, so we add a page */ |
---|
2291 | | - args->size = round_up(start, page_size) + page_size - args->start; |
---|
| 2292 | + size = round_up(start, page_size) + page_size - args->start; |
---|
| 2293 | + if (size > args->size) |
---|
| 2294 | + args->size = size; |
---|
2292 | 2295 | |
---|
2293 | 2296 | return 0; |
---|
2294 | 2297 | } |
---|
.. | .. |
---|
2449 | 2452 | *size = sym->start - *start; |
---|
2450 | 2453 | if (idx > 0) { |
---|
2451 | 2454 | if (*size) |
---|
2452 | | - return 1; |
---|
| 2455 | + return 0; |
---|
2453 | 2456 | } else if (dso_sym_match(sym, sym_name, &cnt, idx)) { |
---|
2454 | 2457 | print_duplicate_syms(dso, sym_name); |
---|
2455 | 2458 | return -EINVAL; |
---|