lkml.org 
[lkml]   [2023]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake
On Thu, Aug 03, 2023 at 09:24:17PM +0800, Guangguan Wang wrote:

...

Hi Guangguan Wang,

> @@ -1063,7 +1063,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc,
> memcpy(clc_v2->r1.eid, eid, SMC_MAX_EID_LEN);
> len = SMCR_CLC_ACCEPT_CONFIRM_LEN_V2;
> if (first_contact) {
> - smc_clc_fill_fce(&fce, &len);
> + smc_clc_fill_fce(&fce, &len, ini->release_ver);

Here ini is dereferenced...


> fce.v2_direct = !link->lgr->uses_gateway;
> memset(&gle, 0, sizeof(gle));
> if (ini && clc->hdr.type == SMC_CLC_CONFIRM) {

... but here it is assumed that ini may be NULL.

This seems inconsistent.

As flagged by Smatch.

...

--
pw-bot: changes-requested

\
 
 \ /
  Last update: 2023-08-03 19:44    [W:0.413 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site