Re: [PATCH net-next] sctp: Pull the user copies out of the individual sockopt functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master v5.7-rc6 next-20200519]
[cannot apply to ipvs/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/David-Laight/sctp-Pull-the-user-copies-out-of-the-individual-sockopt-functions/20200521-040623
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4f65e2f483b6f764c15094d14dd53dda048a4048
config: i386-debian-10.3 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> net/sctp/socket.c:7187:5: warning: no previous prototype for 'kernel_sctp_getsockopt' [-Wmissing-prototypes]
int kernel_sctp_getsockopt(struct sock *sk, int optname, int len, void *optval,
^~~~~~~~~~~~~~~~~~~~~~

vim +/kernel_sctp_getsockopt +7187 net/sctp/socket.c

  7186	
> 7187	int kernel_sctp_getsockopt(struct sock *sk, int optname, int len, void *optval,
  7188				   int *optlen)
  7189	{
  7190		int retval;
  7191	
  7192		lock_sock(sk);
  7193	
  7194		switch (optname) {
  7195		case SCTP_STATUS:
  7196			retval = sctp_getsockopt_sctp_status(sk, len, optval, optlen);
  7197			break;
  7198		case SCTP_DISABLE_FRAGMENTS:
  7199			retval = sctp_getsockopt_disable_fragments(sk, len, optval,
  7200								   optlen);
  7201			break;
  7202		case SCTP_EVENTS:
  7203			retval = sctp_getsockopt_events(sk, len, optval, optlen);
  7204			break;
  7205		case SCTP_AUTOCLOSE:
  7206			retval = sctp_getsockopt_autoclose(sk, len, optval, optlen);
  7207			break;
  7208		case SCTP_SOCKOPT_PEELOFF:
  7209			retval = sctp_getsockopt_peeloff(sk, len, optval, optlen);
  7210			break;
  7211		case SCTP_SOCKOPT_PEELOFF_FLAGS:
  7212			retval = sctp_getsockopt_peeloff_flags(sk, len, optval, optlen);
  7213			break;
  7214		case SCTP_PEER_ADDR_PARAMS:
  7215			retval = sctp_getsockopt_peer_addr_params(sk, len, optval,
  7216								  optlen);
  7217			break;
  7218		case SCTP_DELAYED_SACK:
  7219			retval = sctp_getsockopt_delayed_ack(sk, len, optval,
  7220								  optlen);
  7221			break;
  7222		case SCTP_INITMSG:
  7223			retval = sctp_getsockopt_initmsg(sk, len, optval, optlen);
  7224			break;
  7225		case SCTP_GET_PEER_ADDRS:
  7226			retval = sctp_getsockopt_peer_addrs(sk, len, optval,
  7227							    optlen);
  7228			break;
  7229		case SCTP_GET_LOCAL_ADDRS:
  7230			retval = sctp_getsockopt_local_addrs(sk, len, optval,
  7231							     optlen);
  7232			break;
  7233		case SCTP_SOCKOPT_CONNECTX3:
  7234			retval = sctp_getsockopt_connectx3(sk, len, optval, optlen);
  7235			break;
  7236		case SCTP_DEFAULT_SEND_PARAM:
  7237			retval = sctp_getsockopt_default_send_param(sk, len,
  7238								    optval, optlen);
  7239			break;
  7240		case SCTP_DEFAULT_SNDINFO:
  7241			retval = sctp_getsockopt_default_sndinfo(sk, len,
  7242								 optval, optlen);
  7243			break;
  7244		case SCTP_PRIMARY_ADDR:
  7245			retval = sctp_getsockopt_primary_addr(sk, len, optval, optlen);
  7246			break;
  7247		case SCTP_NODELAY:
  7248			retval = sctp_getsockopt_nodelay(sk, len, optval, optlen);
  7249			break;
  7250		case SCTP_RTOINFO:
  7251			retval = sctp_getsockopt_rtoinfo(sk, len, optval, optlen);
  7252			break;
  7253		case SCTP_ASSOCINFO:
  7254			retval = sctp_getsockopt_associnfo(sk, len, optval, optlen);
  7255			break;
  7256		case SCTP_I_WANT_MAPPED_V4_ADDR:
  7257			retval = sctp_getsockopt_mappedv4(sk, len, optval, optlen);
  7258			break;
  7259		case SCTP_MAXSEG:
  7260			retval = sctp_getsockopt_maxseg(sk, len, optval, optlen);
  7261			break;
  7262		case SCTP_GET_PEER_ADDR_INFO:
  7263			retval = sctp_getsockopt_peer_addr_info(sk, len, optval,
  7264								optlen);
  7265			break;
  7266		case SCTP_ADAPTATION_LAYER:
  7267			retval = sctp_getsockopt_adaptation_layer(sk, len, optval,
  7268								optlen);
  7269			break;
  7270		case SCTP_CONTEXT:
  7271			retval = sctp_getsockopt_context(sk, len, optval, optlen);
  7272			break;
  7273		case SCTP_FRAGMENT_INTERLEAVE:
  7274			retval = sctp_getsockopt_fragment_interleave(sk, len, optval,
  7275								     optlen);
  7276			break;
  7277		case SCTP_PARTIAL_DELIVERY_POINT:
  7278			retval = sctp_getsockopt_partial_delivery_point(sk, len, optval,
  7279									optlen);
  7280			break;
  7281		case SCTP_MAX_BURST:
  7282			retval = sctp_getsockopt_maxburst(sk, len, optval, optlen);
  7283			break;
  7284		case SCTP_AUTH_KEY:
  7285		case SCTP_AUTH_CHUNK:
  7286		case SCTP_AUTH_DELETE_KEY:
  7287		case SCTP_AUTH_DEACTIVATE_KEY:
  7288			retval = -EOPNOTSUPP;
  7289			break;
  7290		case SCTP_HMAC_IDENT:
  7291			retval = sctp_getsockopt_hmac_ident(sk, len, optval, optlen);
  7292			break;
  7293		case SCTP_AUTH_ACTIVE_KEY:
  7294			retval = sctp_getsockopt_active_key(sk, len, optval, optlen);
  7295			break;
  7296		case SCTP_PEER_AUTH_CHUNKS:
  7297			retval = sctp_getsockopt_peer_auth_chunks(sk, len, optval,
  7298								optlen);
  7299			break;
  7300		case SCTP_LOCAL_AUTH_CHUNKS:
  7301			retval = sctp_getsockopt_local_auth_chunks(sk, len, optval,
  7302								optlen);
  7303			break;
  7304		case SCTP_GET_ASSOC_NUMBER:
  7305			retval = sctp_getsockopt_assoc_number(sk, len, optval, optlen);
  7306			break;
  7307		case SCTP_GET_ASSOC_ID_LIST:
  7308			retval = sctp_getsockopt_assoc_ids(sk, len, optval, optlen);
  7309			break;
  7310		case SCTP_AUTO_ASCONF:
  7311			retval = sctp_getsockopt_auto_asconf(sk, len, optval, optlen);
  7312			break;
  7313		case SCTP_PEER_ADDR_THLDS:
  7314			retval = sctp_getsockopt_paddr_thresholds(sk, optval, len,
  7315								  optlen, false);
  7316			break;
  7317		case SCTP_PEER_ADDR_THLDS_V2:
  7318			retval = sctp_getsockopt_paddr_thresholds(sk, optval, len,
  7319								  optlen, true);
  7320			break;
  7321		case SCTP_GET_ASSOC_STATS:
  7322			retval = sctp_getsockopt_assoc_stats(sk, len, optval, optlen);
  7323			break;
  7324		case SCTP_RECVRCVINFO:
  7325			retval = sctp_getsockopt_recvrcvinfo(sk, len, optval, optlen);
  7326			break;
  7327		case SCTP_RECVNXTINFO:
  7328			retval = sctp_getsockopt_recvnxtinfo(sk, len, optval, optlen);
  7329			break;
  7330		case SCTP_PR_SUPPORTED:
  7331			retval = sctp_getsockopt_pr_supported(sk, len, optval, optlen);
  7332			break;
  7333		case SCTP_DEFAULT_PRINFO:
  7334			retval = sctp_getsockopt_default_prinfo(sk, len, optval,
  7335								optlen);
  7336			break;
  7337		case SCTP_PR_ASSOC_STATUS:
  7338			retval = sctp_getsockopt_pr_assocstatus(sk, len, optval,
  7339								optlen);
  7340			break;
  7341		case SCTP_PR_STREAM_STATUS:
  7342			retval = sctp_getsockopt_pr_streamstatus(sk, len, optval,
  7343								 optlen);
  7344			break;
  7345		case SCTP_RECONFIG_SUPPORTED:
  7346			retval = sctp_getsockopt_reconfig_supported(sk, len, optval,
  7347								    optlen);
  7348			break;
  7349		case SCTP_ENABLE_STREAM_RESET:
  7350			retval = sctp_getsockopt_enable_strreset(sk, len, optval,
  7351								 optlen);
  7352			break;
  7353		case SCTP_STREAM_SCHEDULER:
  7354			retval = sctp_getsockopt_scheduler(sk, len, optval,
  7355							   optlen);
  7356			break;
  7357		case SCTP_STREAM_SCHEDULER_VALUE:
  7358			retval = sctp_getsockopt_scheduler_value(sk, len, optval,
  7359								 optlen);
  7360			break;
  7361		case SCTP_INTERLEAVING_SUPPORTED:
  7362			retval = sctp_getsockopt_interleaving_supported(sk, len, optval,
  7363									optlen);
  7364			break;
  7365		case SCTP_REUSE_PORT:
  7366			retval = sctp_getsockopt_reuse_port(sk, len, optval, optlen);
  7367			break;
  7368		case SCTP_EVENT:
  7369			retval = sctp_getsockopt_event(sk, len, optval, optlen);
  7370			break;
  7371		case SCTP_ASCONF_SUPPORTED:
  7372			retval = sctp_getsockopt_asconf_supported(sk, len, optval,
  7373								  optlen);
  7374			break;
  7375		case SCTP_AUTH_SUPPORTED:
  7376			retval = sctp_getsockopt_auth_supported(sk, len, optval,
  7377								optlen);
  7378			break;
  7379		case SCTP_ECN_SUPPORTED:
  7380			retval = sctp_getsockopt_ecn_supported(sk, len, optval, optlen);
  7381			break;
  7382		case SCTP_EXPOSE_POTENTIALLY_FAILED_STATE:
  7383			retval = sctp_getsockopt_pf_expose(sk, len, optval, optlen);
  7384			break;
  7385		default:
  7386			retval = -ENOPROTOOPT;
  7387			break;
  7388		}
  7389	
  7390		release_sock(sk);
  7391		return retval;
  7392	}
  7393	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux