All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-stable:pending-5.10 418/427] net/ipv4/inet_connection_sock.c:1105:21: warning: assignment to 'struct sock *' from 'int' makes pointer from integer without a cast
@ 2023-07-23 23:10 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-23 23:10 UTC (permalink / raw)
  To: Sasha Levin; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.10
head:   f414af0d5334f8d1a8cff50f50e6fb3921d490c4
commit: 7c133f1460cf14b5461dd14ea7ea8da69f1d9254 [418/427] tcp: Migrate TCP_ESTABLISHED/TCP_SYN_RECV sockets in accept queues.
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230724/202307240703.3PnrASdZ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230724/202307240703.3PnrASdZ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307240703.3PnrASdZ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/ipv4/inet_connection_sock.c: In function 'inet_csk_listen_stop':
   net/ipv4/inet_connection_sock.c:1105:23: error: implicit declaration of function 'reuseport_migrate_sock'; did you mean 'reuseport_select_sock'? [-Werror=implicit-function-declaration]
    1105 |                 nsk = reuseport_migrate_sock(sk, child, NULL);
         |                       ^~~~~~~~~~~~~~~~~~~~~~
         |                       reuseport_select_sock
>> net/ipv4/inet_connection_sock.c:1105:21: warning: assignment to 'struct sock *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1105 |                 nsk = reuseport_migrate_sock(sk, child, NULL);
         |                     ^
   cc1: some warnings being treated as errors


vim +1105 net/ipv4/inet_connection_sock.c

  1077	
  1078	/*
  1079	 *	This routine closes sockets which have been at least partially
  1080	 *	opened, but not yet accepted.
  1081	 */
  1082	void inet_csk_listen_stop(struct sock *sk)
  1083	{
  1084		struct inet_connection_sock *icsk = inet_csk(sk);
  1085		struct request_sock_queue *queue = &icsk->icsk_accept_queue;
  1086		struct request_sock *next, *req;
  1087	
  1088		/* Following specs, it would be better either to send FIN
  1089		 * (and enter FIN-WAIT-1, it is normal close)
  1090		 * or to send active reset (abort).
  1091		 * Certainly, it is pretty dangerous while synflood, but it is
  1092		 * bad justification for our negligence 8)
  1093		 * To be honest, we are not able to make either
  1094		 * of the variants now.			--ANK
  1095		 */
  1096		while ((req = reqsk_queue_remove(queue, sk)) != NULL) {
  1097			struct sock *child = req->sk, *nsk;
  1098			struct request_sock *nreq;
  1099	
  1100			local_bh_disable();
  1101			bh_lock_sock(child);
  1102			WARN_ON(sock_owned_by_user(child));
  1103			sock_hold(child);
  1104	
> 1105			nsk = reuseport_migrate_sock(sk, child, NULL);
  1106			if (nsk) {
  1107				nreq = inet_reqsk_clone(req, nsk);
  1108				if (nreq) {
  1109					refcount_set(&nreq->rsk_refcnt, 1);
  1110	
  1111					if (inet_csk_reqsk_queue_add(nsk, nreq, child)) {
  1112						reqsk_migrate_reset(req);
  1113					} else {
  1114						reqsk_migrate_reset(nreq);
  1115						__reqsk_free(nreq);
  1116					}
  1117	
  1118					/* inet_csk_reqsk_queue_add() has already
  1119					 * called inet_child_forget() on failure case.
  1120					 */
  1121					goto skip_child_forget;
  1122				}
  1123			}
  1124	
  1125			inet_child_forget(sk, req, child);
  1126	skip_child_forget:
  1127			reqsk_put(req);
  1128			bh_unlock_sock(child);
  1129			local_bh_enable();
  1130			sock_put(child);
  1131	
  1132			cond_resched();
  1133		}
  1134		if (queue->fastopenq.rskq_rst_head) {
  1135			/* Free all the reqs queued in rskq_rst_head. */
  1136			spin_lock_bh(&queue->fastopenq.lock);
  1137			req = queue->fastopenq.rskq_rst_head;
  1138			queue->fastopenq.rskq_rst_head = NULL;
  1139			spin_unlock_bh(&queue->fastopenq.lock);
  1140			while (req != NULL) {
  1141				next = req->dl_next;
  1142				reqsk_put(req);
  1143				req = next;
  1144			}
  1145		}
  1146		WARN_ON_ONCE(sk->sk_ack_backlog);
  1147	}
  1148	EXPORT_SYMBOL_GPL(inet_csk_listen_stop);
  1149	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-23 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-23 23:10 [sashal-stable:pending-5.10 418/427] net/ipv4/inet_connection_sock.c:1105:21: warning: assignment to 'struct sock *' from 'int' makes pointer from integer without a cast kernel test robot

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.