From: Wang Weidong <wangweidong1@huawei.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt
Date: Mon, 02 Dec 2013 08:48:44 +0000 [thread overview]
Message-ID: <529C496C.10403@huawei.com> (raw)
From: Wang Weidong <wangweidong1@huawei.com>
When I do the test_1_to_1_sockopt, I got a Segmentation fault:
DUMP_CORE test_1_to_1_sockopt.c: 343.
I used the kernel is 3.12.
The problem is that the SOCK_MIN_SNDBUF is (TCP_SKB_MIN_TRUESIZE * 2)
while TCP_SKB_MIN_TRUESIZE is 2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))
The SKB_DATA_ALIGN I test is 256, so I make the sndbuf_val_set to 2304.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
src/func_tests/test_1_to_1_sockopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/func_tests/test_1_to_1_sockopt.c b/src/func_tests/test_1_to_1_sockopt.c
index e222991..986533b 100644
--- a/src/func_tests/test_1_to_1_sockopt.c
+++ b/src/func_tests/test_1_to_1_sockopt.c
@@ -320,7 +320,7 @@ main(void)
"got value differs Set Value=%d Get Value=%d",
(2*rcvbuf_val_set), rcvbuf_val_get);
- sndbuf_val_set = 2048;
+ sndbuf_val_set = 2304;
/* TEST17: Test case for setsockopt SO_SNDBUF */
error = setsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_set, len);
if (error < 0)
-- 1.7.12
next reply other threads:[~2013-12-02 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 8:48 Wang Weidong [this message]
2013-12-02 12:59 ` [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt Daniel Borkmann
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=529C496C.10403@huawei.com \
--to=wangweidong1@huawei.com \
--cc=linux-sctp@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.