Re: Re: [PATCH] thunderbolt: Fix a double put in tb_cfg_read_raw

2021-03-23 Thread Mika Westerberg
michael.ja...@intel.com, > > yehezkel...@gmail.com, linux-...@vger.kernel.org, > > linux-kernel@vger.kernel.org > > 主题: Re: [PATCH] thunderbolt: Fix a double put in tb_cfg_read_raw > > > > Hi, > > > > On Mon, Mar 22, 2021 at 08:15:12PM -0700, Lv Yunlong wrote: > &g

Re: Re: [PATCH] thunderbolt: Fix a double put in tb_cfg_read_raw

2021-03-23 Thread lyl2019
> -原始邮件- > 发件人: "Mika Westerberg" > 发送时间: 2021-03-23 22:06:47 (星期二) > 收件人: "Lv Yunlong" > 抄送: andreas.noe...@gmail.com, michael.ja...@intel.com, yehezkel...@gmail.com, > linux-...@vger.kernel.org, linux-kernel@vger.kernel.org > 主题: Re:

Re: [PATCH] thunderbolt: Fix a double put in tb_cfg_read_raw

2021-03-23 Thread Mika Westerberg
Hi, On Mon, Mar 22, 2021 at 08:15:12PM -0700, Lv Yunlong wrote: > In tb_cfg_read_raw, req is allocated by tb_cfg_request_alloc() > with an initial reference. Before calling tb_cfg_request_sync(), > there is no refcount inc operation. tb_cfg_request_sync() > calls tb_cfg_request(..,req,..) and if t

[PATCH] thunderbolt: Fix a double put in tb_cfg_read_raw

2021-03-22 Thread Lv Yunlong
In tb_cfg_read_raw, req is allocated by tb_cfg_request_alloc() with an initial reference. Before calling tb_cfg_request_sync(), there is no refcount inc operation. tb_cfg_request_sync() calls tb_cfg_request(..,req,..) and if the callee failed, the initial reference of req is dropped and req is free