* [mingo-tip:WIP.timers/core 4/10] net/ipv4/inet_connection_sock.c:1072:36: error: implicit declaration of function 'from_timer'; did you mean 'mod_timer'?
@ 2025-04-16 14:50 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-16 14:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: oe-kbuild-all, Ingo Molnar
Hi Ingo,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.timers/core
head: e42d8536937923868af908502797aa7923df52b1
commit: 24e5f9a3c2f20d7a7c04b6d5cb2b4b7ec4f1a707 [4/10] treewide, timers: Rename destroy_timer_on_stack() => timer_destroy_on_stack()
config: i386-buildonly-randconfig-002-20250416 (https://download.01.org/0day-ci/archive/20250416/202504162210.OqBPCaeh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250416/202504162210.OqBPCaeh-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/202504162210.OqBPCaeh-lkp@intel.com/
All errors (new ones prefixed by >>):
net/ipv4/inet_connection_sock.c: In function 'reqsk_timer_handler':
>> net/ipv4/inet_connection_sock.c:1072:36: error: implicit declaration of function 'from_timer'; did you mean 'mod_timer'? [-Werror=implicit-function-declaration]
1072 | struct request_sock *req = from_timer(req, t, rsk_timer);
| ^~~~~~~~~~
| mod_timer
>> net/ipv4/inet_connection_sock.c:1072:55: error: 'rsk_timer' undeclared (first use in this function); did you mean 'bpf_timer'?
1072 | struct request_sock *req = from_timer(req, t, rsk_timer);
| ^~~~~~~~~
| bpf_timer
net/ipv4/inet_connection_sock.c:1072:55: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +1072 net/ipv4/inet_connection_sock.c
1069
1070 static void reqsk_timer_handler(struct timer_list *t)
1071 {
> 1072 struct request_sock *req = from_timer(req, t, rsk_timer);
1073 struct request_sock *nreq = NULL, *oreq = req;
1074 struct sock *sk_listener = req->rsk_listener;
1075 struct inet_connection_sock *icsk;
1076 struct request_sock_queue *queue;
1077 struct net *net;
1078 int max_syn_ack_retries, qlen, expire = 0, resend = 0;
1079
1080 if (inet_sk_state_load(sk_listener) != TCP_LISTEN) {
1081 struct sock *nsk;
1082
1083 nsk = reuseport_migrate_sock(sk_listener, req_to_sk(req), NULL);
1084 if (!nsk)
1085 goto drop;
1086
1087 nreq = inet_reqsk_clone(req, nsk);
1088 if (!nreq)
1089 goto drop;
1090
1091 /* The new timer for the cloned req can decrease the 2
1092 * by calling inet_csk_reqsk_queue_drop_and_put(), so
1093 * hold another count to prevent use-after-free and
1094 * call reqsk_put() just before return.
1095 */
1096 refcount_set(&nreq->rsk_refcnt, 2 + 1);
1097 timer_setup(&nreq->rsk_timer, reqsk_timer_handler, TIMER_PINNED);
1098 reqsk_queue_migrated(&inet_csk(nsk)->icsk_accept_queue, req);
1099
1100 req = nreq;
1101 sk_listener = nsk;
1102 }
1103
1104 icsk = inet_csk(sk_listener);
1105 net = sock_net(sk_listener);
1106 max_syn_ack_retries = READ_ONCE(icsk->icsk_syn_retries) ? :
1107 READ_ONCE(net->ipv4.sysctl_tcp_synack_retries);
1108 /* Normally all the openreqs are young and become mature
1109 * (i.e. converted to established socket) for first timeout.
1110 * If synack was not acknowledged for 1 second, it means
1111 * one of the following things: synack was lost, ack was lost,
1112 * rtt is high or nobody planned to ack (i.e. synflood).
1113 * When server is a bit loaded, queue is populated with old
1114 * open requests, reducing effective size of queue.
1115 * When server is well loaded, queue size reduces to zero
1116 * after several minutes of work. It is not synflood,
1117 * it is normal operation. The solution is pruning
1118 * too old entries overriding normal timeout, when
1119 * situation becomes dangerous.
1120 *
1121 * Essentially, we reserve half of room for young
1122 * embrions; and abort old ones without pity, if old
1123 * ones are about to clog our table.
1124 */
1125 queue = &icsk->icsk_accept_queue;
1126 qlen = reqsk_queue_len(queue);
1127 if ((qlen << 1) > max(8U, READ_ONCE(sk_listener->sk_max_ack_backlog))) {
1128 int young = reqsk_queue_len_young(queue) << 1;
1129
1130 while (max_syn_ack_retries > 2) {
1131 if (qlen < young)
1132 break;
1133 max_syn_ack_retries--;
1134 young <<= 1;
1135 }
1136 }
1137 syn_ack_recalc(req, max_syn_ack_retries, READ_ONCE(queue->rskq_defer_accept),
1138 &expire, &resend);
1139 req->rsk_ops->syn_ack_timeout(req);
1140 if (!expire &&
1141 (!resend ||
1142 !inet_rtx_syn_ack(sk_listener, req) ||
1143 inet_rsk(req)->acked)) {
1144 if (req->num_timeout++ == 0)
1145 atomic_dec(&queue->young);
1146 mod_timer(&req->rsk_timer, jiffies + reqsk_timeout(req, TCP_RTO_MAX));
1147
1148 if (!nreq)
1149 return;
1150
1151 if (!inet_ehash_insert(req_to_sk(nreq), req_to_sk(oreq), NULL)) {
1152 /* delete timer */
1153 __inet_csk_reqsk_queue_drop(sk_listener, nreq, true);
1154 goto no_ownership;
1155 }
1156
1157 __NET_INC_STATS(net, LINUX_MIB_TCPMIGRATEREQSUCCESS);
1158 reqsk_migrate_reset(oreq);
1159 reqsk_queue_removed(&inet_csk(oreq->rsk_listener)->icsk_accept_queue, oreq);
1160 reqsk_put(oreq);
1161
1162 reqsk_put(nreq);
1163 return;
1164 }
1165
1166 /* Even if we can clone the req, we may need not retransmit any more
1167 * SYN+ACKs (nreq->num_timeout > max_syn_ack_retries, etc), or another
1168 * CPU may win the "own_req" race so that inet_ehash_insert() fails.
1169 */
1170 if (nreq) {
1171 __NET_INC_STATS(net, LINUX_MIB_TCPMIGRATEREQFAILURE);
1172 no_ownership:
1173 reqsk_migrate_reset(nreq);
1174 reqsk_queue_removed(queue, nreq);
1175 __reqsk_free(nreq);
1176 }
1177
1178 drop:
1179 __inet_csk_reqsk_queue_drop(sk_listener, oreq, true);
1180 reqsk_put(oreq);
1181 }
1182
--
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:[~2025-04-16 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 14:50 [mingo-tip:WIP.timers/core 4/10] net/ipv4/inet_connection_sock.c:1072:36: error: implicit declaration of function 'from_timer'; did you mean 'mod_timer'? 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.