public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Guangguan Wang <guangguan.wang@linux.alibaba.com>
To: Simon Horman <horms@kernel.org>
Cc: wenjia@linux.ibm.com, jaka@linux.ibm.com, kgraul@linux.ibm.com,
	tonylu@linux.alibaba.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	alibuda@linux.alibaba.com, guwen@linux.alibaba.com,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake
Date: Fri, 4 Aug 2023 11:59:03 +0800	[thread overview]
Message-ID: <995aeae7-86f5-494a-3f7a-1fcc32f27181@linux.alibaba.com> (raw)
In-Reply-To: <ZMvnIszqS4ZpkYHj@kernel.org>

Hi Simon,

Thanks for the review.

Before this patch set, the ini pointer is NULL when sending accept clc msg. This patch set
has changed the ini pointer to non-NULL value both when sending accept clc msg and when
sending confirm clc msg. And the ini pointer in smc_clc_send_confirm_accept will not be NULL
any more.

I will remove the ini NULL check in the next version.
if (ini && clc->hdr.type == SMC_CLC_CONFIRM) => if (clc->hdr.type == SMC_CLC_CONFIRM)

Thanks,
Guangguan Wang

On 2023/8/4 01:42, Simon Horman wrote:
> 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.
> 
> ...
> 

  reply	other threads:[~2023-08-04  3:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 13:24 [RFC PATCH net-next 0/6] net/smc: serveral features's implementation for smc v2.1 Guangguan Wang
2023-08-03 13:24 ` [RFC PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake Guangguan Wang
2023-08-03 17:42   ` Simon Horman
2023-08-04  3:59     ` Guangguan Wang [this message]
2023-08-03 13:24 ` [RFC PATCH net-next 2/6] net/smc: add vendor unique experimental options area " Guangguan Wang
2023-08-03 17:45   ` Simon Horman
2023-08-04  4:02     ` Guangguan Wang
2023-08-03 13:24 ` [RFC PATCH net-next 3/6] net/smc: support smc v2.x features validate Guangguan Wang
2023-08-03 13:24 ` [RFC PATCH net-next 4/6] net/smc: support max connections per lgr negotiation Guangguan Wang
2023-08-03 17:55   ` Simon Horman
2023-08-04  6:40     ` Guangguan Wang
2023-08-03 13:24 ` [RFC PATCH net-next 5/6] net/smc: support max links per lgr negotiation in clc handshake Guangguan Wang
2023-08-03 13:24 ` [RFC PATCH net-next 6/6] net/smc: Extend SMCR v2 linkgroup netlink attribute Guangguan Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=995aeae7-86f5-494a-3f7a-1fcc32f27181@linux.alibaba.com \
    --to=guangguan.wang@linux.alibaba.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=horms@kernel.org \
    --cc=jaka@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox