Re: [PATCH net v5 1/3] net/smc: fix use-after-free of the LLC qentry in smc_llc_srv_add_link()
Yehyeong Lee <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
> Instead of these two kfree, can you just 'goto out' ? out: seems to do > the free nows, and rc is 0 above. Done in v6. > Also, is send_req_add_link_resp always false in smc_llc_srv_add_link() ? Not throughout: it is true for a peer REQ_ADD_LINK, and the early gotos above smc_llc.c:1495 use it. Every path that reaches the success return passes that line, which clears it, so it is false there and the goto is equivalent - with your suggestion applied the object code of smc_llc_srv_add_link() is unchanged. Best regards, Yehyeong Lee