diff for duplicates of <20190912225154.GF3499@localhost.localdomain> diff --git a/a/1.txt b/N1/1.txt index ce9307e..56405e2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -83,18 +83,19 @@ On Thu, Sep 12, 2019 at 01:47:08AM +0800, Xin Long wrote: > > > optlen)) > > > return -EFAULT; > > > -> > > if (sock_net(sk)->sctp.ps_retrans = 0xffff) +> > > if (sock_net(sk)->sctp.ps_retrans == 0xffff) > > > val.spt_pathcpthld = 0xffff; > > > > I'm confused with the snippets, but if I got them right, this is after > > dealing with proper len and could leave val.spt_pathcpthld -> > uninitialized if the application used the old format and sysctl is !> > 0xffff. +> > uninitialized if the application used the old format and sysctl is != +> > 0xffff. > right, how about this in sctp_setsockopt_paddr_thresholds(): > > offset = ALIGN(offsetof(struct sctp_paddrthlds, spt_pathcpthld), 4); > if (optlen < offset) > return -EINVAL; -> if (optlen < sizeof(val) || sock_net(sk)->sctp.ps_retrans = 0xffff) { +> if (optlen < sizeof(val) || sock_net(sk)->sctp.ps_retrans == 0xffff) { > optlen = offset; > val.spt_pathcpthld = 0xffff; > } else { @@ -112,7 +113,7 @@ On Thu, Sep 12, 2019 at 01:47:08AM +0800, Xin Long wrote: > (ps_retrans is disabled and it's using new format). This will be inconsistent if we end up having to add another field -after spt_pathcpthld, because it will get ignored if ps_retrans = +after spt_pathcpthld, because it will get ignored if ps_retrans == 0xffff. Lets not optimize out the fields please. This is already very tricky to get right. @@ -123,7 +124,7 @@ tricky to get right. > offset = ALIGN(offsetof(struct sctp_paddrthlds, spt_pathcpthld), 4); > if (len < offset) > return -EINVAL; -> if (len < sizeof(val) || sock_net(sk)->sctp.ps_retrans = 0xffff) +> if (len < sizeof(val) || sock_net(sk)->sctp.ps_retrans == 0xffff) > len = offset; > else > len = sizeof(val); diff --git a/a/content_digest b/N1/content_digest index da6d415..f4d9f2d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -9,7 +9,7 @@ "ref\0CADvbK_e=4Fo7dmM=4QTZHtNDtsrDVe_VtyG2NVqt_3r9z7R=PA@mail.gmail.com\0" "From\0Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>\0" "Subject\0Re: [PATCH net-next 5/5] sctp: add spt_pathcpthld in struct sctp_paddrthlds\0" - "Date\0Thu, 12 Sep 2019 22:51:54 +0000\0" + "Date\0Thu, 12 Sep 2019 19:51:54 -0300\0" "To\0Xin Long <lucien.xin@gmail.com>\0" "Cc\0David Laight <David.Laight@aculab.com>" network dev <netdev@vger.kernel.org> @@ -103,18 +103,19 @@ "> > > optlen))\n" "> > > return -EFAULT;\n" "> > >\n" - "> > > if (sock_net(sk)->sctp.ps_retrans = 0xffff)\n" + "> > > if (sock_net(sk)->sctp.ps_retrans == 0xffff)\n" "> > > val.spt_pathcpthld = 0xffff;\n" "> >\n" "> > I'm confused with the snippets, but if I got them right, this is after\n" "> > dealing with proper len and could leave val.spt_pathcpthld\n" - "> > uninitialized if the application used the old format and sysctl is !> > 0xffff.\n" + "> > uninitialized if the application used the old format and sysctl is !=\n" + "> > 0xffff.\n" "> right, how about this in sctp_setsockopt_paddr_thresholds():\n" "> \n" "> offset = ALIGN(offsetof(struct sctp_paddrthlds, spt_pathcpthld), 4);\n" "> if (optlen < offset)\n" "> return -EINVAL;\n" - "> if (optlen < sizeof(val) || sock_net(sk)->sctp.ps_retrans = 0xffff) {\n" + "> if (optlen < sizeof(val) || sock_net(sk)->sctp.ps_retrans == 0xffff) {\n" "> optlen = offset;\n" "> val.spt_pathcpthld = 0xffff;\n" "> } else {\n" @@ -132,7 +133,7 @@ "> (ps_retrans is disabled and it's using new format).\n" "\n" "This will be inconsistent if we end up having to add another field\n" - "after spt_pathcpthld, because it will get ignored if ps_retrans =\n" + "after spt_pathcpthld, because it will get ignored if ps_retrans ==\n" "0xffff. Lets not optimize out the fields please. This is already very\n" "tricky to get right.\n" "\n" @@ -143,7 +144,7 @@ "> offset = ALIGN(offsetof(struct sctp_paddrthlds, spt_pathcpthld), 4);\n" "> if (len < offset)\n" "> return -EINVAL;\n" - "> if (len < sizeof(val) || sock_net(sk)->sctp.ps_retrans = 0xffff)\n" + "> if (len < sizeof(val) || sock_net(sk)->sctp.ps_retrans == 0xffff)\n" "> len = offset;\n" "> else\n" "> len = sizeof(val);\n" @@ -173,4 +174,4 @@ "> > >\n" > -a9082772bfccbae3bd27b780b27c15fef9076ab2f84582efa3440d2fd588b495 +2b8c45880473cb8d8d9f788927e6c042f4274921262e9bded140a2bf0cf632e0
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.