diff for duplicates of <51BB2DE6.40703@redhat.com> diff --git a/a/1.txt b/N1/1.txt index 3891768..b5c7420 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -19,7 +19,7 @@ On 06/14/2013 04:33 PM, Vlad Yasevich wrote: >> @@ -134,9 +134,18 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo >> struct sctp_af *af; >> ->> if (epb->type = SCTP_EP_TYPE_ASSOCIATION) { +>> if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { >> - asoc = sctp_assoc(epb); >> - peer = asoc->peer.primary_path; >> - primary = &peer->saddr; @@ -33,7 +33,7 @@ On 06/14/2013 04:33 PM, Vlad Yasevich wrote: >> + * interpreter SCTP_CMD_ASOC_NEW was called on a non-fully >> + * set up association. So do hara-kiri until this is fixed. >> + */ ->> + BUG_ON(peer = NULL); +>> + BUG_ON(peer == NULL); >> + primary = &peer->saddr; > > I am still trying to convince myself whether this BUG_ON() is the right thing to do... @@ -50,7 +50,7 @@ So we might as well tell the user why this is happening before he debugs on this for quite a while. > One thought I had was to change the above into something like this: -> if (peer = NULL) { +> if (peer == NULL) { > WARN(1, "Association %p with NULL primary path", asoc); > return; > } @@ -64,7 +64,7 @@ like that. > And add the following to handler for SCTP_CMD_NEW_ASOC and may be also to sctp_cmd_delete_tcb() > -> BUG_ON(asoc->peer.primary_path = NULL); +> BUG_ON(asoc->peer.primary_path == NULL); > > This way, we would bug on additional and removal paths which have the > possibility of giving us a lot more information about why the condition diff --git a/a/content_digest b/N1/content_digest index 6a30606..ee355c0 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,7 +3,7 @@ "ref\051BB29A4.7090106@gmail.com\0" "From\0Daniel Borkmann <dborkman@redhat.com>\0" "Subject\0Re: [PATCH net-next 1/4] net: sctp: sctp_seq_dump_local_addrs: throw BUG if primary_path is NULL\0" - "Date\0Fri, 14 Jun 2013 14:51:18 +0000\0" + "Date\0Fri, 14 Jun 2013 16:51:18 +0200\0" "To\0Vlad Yasevich <vyasevich@gmail.com>\0" "Cc\0davem@davemloft.net" netdev@vger.kernel.org @@ -31,7 +31,7 @@ ">> @@ -134,9 +134,18 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo\n" ">> struct sctp_af *af;\n" ">>\n" - ">> if (epb->type = SCTP_EP_TYPE_ASSOCIATION) {\n" + ">> if (epb->type == SCTP_EP_TYPE_ASSOCIATION) {\n" ">> - asoc = sctp_assoc(epb);\n" ">> - peer = asoc->peer.primary_path;\n" ">> - primary = &peer->saddr;\n" @@ -45,7 +45,7 @@ ">> + * interpreter SCTP_CMD_ASOC_NEW was called on a non-fully\n" ">> + * set up association. So do hara-kiri until this is fixed.\n" ">> + */\n" - ">> + BUG_ON(peer = NULL);\n" + ">> + BUG_ON(peer == NULL);\n" ">> + primary = &peer->saddr;\n" ">\n" "> I am still trying to convince myself whether this BUG_ON() is the right thing to do...\n" @@ -62,7 +62,7 @@ "for quite a while.\n" "\n" "> One thought I had was to change the above into something like this:\n" - "> if (peer = NULL) {\n" + "> if (peer == NULL) {\n" "> WARN(1, \"Association %p with NULL primary path\", asoc);\n" "> return;\n" "> }\n" @@ -76,7 +76,7 @@ "\n" "> And add the following to handler for SCTP_CMD_NEW_ASOC and may be also to sctp_cmd_delete_tcb()\n" ">\n" - "> BUG_ON(asoc->peer.primary_path = NULL);\n" + "> BUG_ON(asoc->peer.primary_path == NULL);\n" ">\n" "> This way, we would bug on additional and removal paths which have the\n" "> possibility of giving us a lot more information about why the condition\n" @@ -88,4 +88,4 @@ "\n" Daniel -26c87b67ff735f674304fc3e0810b57de0ef54902fb4fd02138c8d0687001c3f +8a2bd6ce60ce312077f97248c3f945aba4ab302a9ae4c59bfcecad82f61a65c6
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.