!1448  Tracing fixes

Merge Pull Request from: @ci-robot 
 
PR sync from: Zheng Yejian <zhengyejian1@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/REOTE3BIB3EUEAL5WCIOUTDVJ5RVAC3N/ 
Tracing fixes:
- Fix a deadloop in reading trace_pipe that was caused by a mismatch
  between ring_buffer_empty() returning false which then asked to
  read the data, but the read code uses rb_num_of_entries() that
  returned zero, and causing an infinite "retry".

- Fix a warning caused by not using all pages allocated to store
  ftrace functions, where this can happen if the linker inserts a bunch of
  "NULL" entries, causing the accounting of how many pages needed
  to be off.

- Fix memory leak in freeing iter->temp in tracing_release_pipe().

Linus Torvalds (1):
  ftrace: Store the order of pages allocated in ftrace_page

Zheng Yejian (3):
  ring-buffer: Fix deadloop issue on reading trace_pipe
  tracing: Fix memory leak of iter->temp when reading trace_pipe
  ftrace: Fix possible warning on checking all pages used in
    ftrace_process_locs()


-- 
2.25.1
 
https://gitee.com/openeuler/kernel/issues/I7KXY9
https://gitee.com/openeuler/kernel/issues/I7KYPM
https://gitee.com/openeuler/kernel/issues/I7L517 
 
Link:https://gitee.com/openeuler/kernel/pulls/1448 

Reviewed-by: Xu Kuohai <xukuohai@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>