tree:
git://git.infradead.org/users/hch/misc.git kernel_setsockopt
head: 43d0f0870df329db68ecbae8e699615ff0c009f1
commit: 14a156d7bffb7051e47cada85e62cbaccea7fd03 [10/32] net: add sock_set_rcvbuf
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 14a156d7bffb7051e47cada85e62cbaccea7fd03
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
> net/core/sock.c:807:6: warning: no previous prototype for
'__sock_set_rcvbuf' [-Wmissing-prototypes]
807 | void
__sock_set_rcvbuf(struct sock *sk, int val)
| ^~~~~~~~~~~~~~~~~
vim +/__sock_set_rcvbuf +807 net/core/sock.c
806
807 void __sock_set_rcvbuf(struct sock *sk, int val)
808 {
809 /* Ensure val * 2 fits into an int, to prevent max_t() from treating it
810 * as a negative value.
811 */
812 val = min_t(int, val, INT_MAX / 2);
813 sk->sk_userlocks |= SOCK_RCVBUF_LOCK;
814
815 /* We double it on the way in to account for "struct sk_buff" etc.
816 * overhead. Applications assume that the SO_RCVBUF setting they make
817 * will allow that much actual data to be received on that socket.
818 *
819 * Applications are unaware that "struct sk_buff" and other overheads
820 * allocate from the receive buffer during socket buffer allocation.
821 *
822 * And after considering the possible alternatives, returning the value
823 * we actually used in getsockopt is the most desirable behavior.
824 */
825 WRITE_ONCE(sk->sk_rcvbuf, max_t(int, val * 2, SOCK_MIN_RCVBUF));
826 }
827
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org