dlm: fix error return code in sctp_accept_from_sock()
PATCH 1/1 dlm: fix error return code in sctp_accept_from_sock()
From: Wei Yongjun <[email protected]>
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- fs/dlm/lowcomms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/dlm/lowcomms.c +2 -1
@@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection *con) }make_sockaddr (&prim.ssp_addr,0 , &addr_len); -if (addr_to_nodeid (&prim.ssp_addr, &nodeid)) { + ret =addr_to_nodeid (&prim.ssp_addr, &nodeid); +if (ret) {unsigned char *b = (unsigned char *)&prim.ssp_addr;log_print ("reject connect from unknown addr" );
PATCH 1/1 dlm: fix error return code in sctp_accept_from_sock()
Hi,
Coding style patch is always rejected;-)
Eric
Quoted 28 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Signed-off-by Wei Yongjun <[email protected]>--- fs/dlm/lowcomms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/dlm/lowcomms.c +2
-1@@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection *con) }make_sockaddr (&prim.ssp_addr,0 , &addr_len); -if (addr_to_nodeid (&prim.ssp_addr, &nodeid)) { + ret =addr_to_nodeid (&prim.ssp_addr, &nodeid); +if (ret) {unsigned char *b = (unsigned char *)&prim.ssp_addr;log_print ("reject connect from unknown addr" );
PATCH 1/1 dlm: fix error return code in sctp_accept_from_sock()
Hi Eric,
Quoted 9 lines
-----Original Message-----
From: Eric Ren [mailto:zren at suse.com]
Sent: Tuesday, October 25, 2016 10:52 AM
To: Wei Yongjun <[email protected]>; Christine Caulfield <[email protected]>; David Teigland <[email protected]>; cluster- devel at redhat.com; weiyongjun (A) <[email protected]>
Subject: Re: [Cluster-devel] [PATCH -next] dlm: fix error return code insctp_accept_from_sock()
Quoted 3 lines
Hi,
Coding style patch is always rejected;-)
Are you sure this is a coding style patch?
This patch fix the issue when addr_to_nodeid() failed, sctp_accept_from_sock() still return success, not error.
But if the patch is useless, please ignore it.
Regards
Yongjun Wei
Quoted 32 lines
Eric
fs/dlm/lowcomms.c static int sctp_accept_from_sock(struct connection
Quoted 15 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Signed-off-by Wei Yongjun <[email protected]>--- fs/dlm/lowcomms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/dlm/lowcomms.c +0
-0@@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection*con)
Quoted 13 lines
fs/dlm/lowcomms.c +2
-1}make_sockaddr (&prim.ssp_addr,0 , &addr_len); -if (addr_to_nodeid (&prim.ssp_addr, &nodeid)) { + ret =addr_to_nodeid (&prim.ssp_addr, &nodeid); +if (ret) {unsigned char *b = (unsigned char *)&prim.ssp_addr;log_print ("reject connect from unknown addr" );
PATCH 1/1 dlm: fix error return code in sctp_accept_from_sock()
Hi,
Quoted 11 lines · weiyongjun (A)
Hi Eric,
Quoted 9 lines
-----Original Message-----
From: Eric Ren [mailto:zren at suse.com]
Sent: Tuesday, October 25, 2016 10:52 AM
To: Wei Yongjun <[email protected]>; Christine Caulfield <[email protected]>; David Teigland <[email protected]>; cluster- devel at redhat.com; weiyongjun (A) <[email protected]>
Subject: Re: [Cluster-devel] [PATCH -next] dlm: fix error return code insctp_accept_from_sock()
Quoted 8 lines
Quoted 3 lines
Hi,
Coding style patch is always rejected;-)
Are you sure this is a coding style patch?
This patch fix the issue when
addr_to_nodeid()failed,sctp_accept_from_sock()still return success, not error.
Oh sorry, I'm wrong. Then,
Eric
Quoted 37 lines
But if the patch is useless, please ignore it.
Regards
Yongjun WeiQuoted 31 lines
Eric
fs/dlm/lowcomms.c static int sctp_accept_from_sock(struct connection
Quoted 15 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Signed-off-by Wei Yongjun <[email protected]>--- fs/dlm/lowcomms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/dlm/lowcomms.c +0
-0@@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection*con)
Quoted 13 lines
fs/dlm/lowcomms.c +2
-1}make_sockaddr (&prim.ssp_addr,0 , &addr_len); -if (addr_to_nodeid (&prim.ssp_addr, &nodeid)) { + ret =addr_to_nodeid (&prim.ssp_addr, &nodeid); +if (ret) {unsigned char *b = (unsigned char *)&prim.ssp_addr;log_print ("reject connect from unknown addr" );