[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 1 Jan 2017 21:23:44 +0800
From: Xin Long <lucien.xin@...il.com>
To: kbuild test robot <lkp@...el.com>
Cc: kbuild-all@...org, network dev <netdev@...r.kernel.org>,
linux-sctp@...r.kernel.org,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Neil Horman <nhorman@...driver.com>,
davem <davem@...emloft.net>
Subject: Re: [PATCH net-next 20/27] sctp: add rfc6525 section 5.2.2
On Sun, Jan 1, 2017 at 8:02 PM, kbuild test robot <lkp@...el.com> wrote:
> Hi Xin,
>
> [auto build test WARNING on net-next/master]
>
> url: https://github.com/0day-ci/linux/commits/Xin-Long/sctp-implement-rfc6525-sctp-stream-reconf/20170101-192844
> config: x86_64-randconfig-x015-201701 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
>
> All warnings (new ones prefixed by >>):
>
> net/sctp/stream.c: In function 'sctp_process_strreset_outreq':
>>> net/sctp/stream.c:140:9: warning: 'str_p' may be used uninitialized in this function [-Wmaybe-uninitialized]
> *evp = sctp_ulpevent_make_stream_reset_event(asoc,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flags | SCTP_STREAM_RESET_OUTGOING_SSN, nums, str_p,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> GFP_ATOMIC);
> ~~~~~~~~~~~
>
This warning is actually safe, as only when nums is NULL, str_p is
uninitialized, and in sctp_ulpevent_make_stream_reset_event(), if nums
is null, str_p wouldn't be really used.
> vim +/str_p +140 net/sctp/stream.c
>
> 124 if (str_p[i] >= asoc->streamincnt) {
> 125 result = SCTP_STRRESET_ERR_WRONG_SSN;
> 126 goto out;
> 127 }
> 128 }
> 129
> 130 str_p = outreq->list_of_streams;
> 131 for (i = 0; i < nums; i++, str_p++)
> 132 asoc->streamin[*str_p].ssn = 0;
> 133 } else {
> 134 for (i = 0; i < asoc->streamincnt; i++)
> 135 asoc->streamin[i].ssn = 0;
> 136 }
> 137
> 138 result = SCTP_STRRESET_PERFORMED;
> 139
> > 140 *evp = sctp_ulpevent_make_stream_reset_event(asoc,
> 141 flags | SCTP_STREAM_RESET_OUTGOING_SSN, nums, str_p,
> 142 GFP_ATOMIC);
> 143
> 144 out:
> 145 return sctp_make_strreset_resp(asoc, result, request_seq);
> 146 }
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists