Re: [PATCH iproute2-rc 2/2] rdma: Fix the error of accessing string variable outside the lifecycle
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2024-01-08 17:25:03
Also in:
linux-rdma, lkml
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2024-01-08 17:25:03
Also in:
linux-rdma, lkml
On Mon, 8 Jan 2024 17:10:04 +0100 Andrea Claudi [off-list ref] wrote:
On Mon, Jan 08, 2024 at 09:28:52AM +0800, Junxian Huang wrote:quoted
Hi all, the first patch is replaced by Stephen's latest patches. Are there any comments to this patch? Thanks, Junxian On 2023/12/29 14:52, Junxian Huang wrote:quoted
From: wenglianfa <redacted> All these SPRINT_BUF(b) definitions are inside the 'if' block, but accessed outside the 'if' block through the pointers 'comm'. This leads to empty 'comm' attribute when querying resource information. So move the definitions to the beginning of the functions to extend their life cycle. Before: $ rdma res show srq dev hns_0 srqn 0 type BASIC lqpn 18 pdn 5 pid 7775 comm After: $ rdma res show srq dev hns_0 srqn 0 type BASIC lqpn 18 pdn 5 pid 7775 comm ib_send_bw Fixes: 1808f002dfdd ("lib/fs: fix memory leak in get_task_name()") Signed-off-by: wenglianfa <redacted> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> ---Hi Junxian, For future patches, you can have a faster feedback adding to cc the author of the original patch. In this case it's me, so here's my Acked-by: Andrea Claudi <redacted>
I just merged this one