All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steve French <stfrench@microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [smfrench-smb3:ksmbd-for-next-next 2/3] fs/smb/server/transport_tcp.c:262:47: error: no member named 'skc_v6_daddr' in 'struct sock_common'
Date: Mon, 25 Aug 2025 12:13:34 +0800	[thread overview]
Message-ID: <202508251245.Y24eUGc5-lkp@intel.com> (raw)

tree:   https://github.com/smfrench/smb3-kernel.git ksmbd-for-next-next
head:   0edf873d496a9fc1c4e0ca77e29a12231403ecf1
commit: 133b8c914b4ff05d088bd69977bc854a5757dc25 [2/3] ksmbd: replace connection list with hash table
config: sparc64-randconfig-002-20250825 (https://download.01.org/0day-ci/archive/20250825/202508251245.Y24eUGc5-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d26ea02060b1c9db751d188b2edb0059a9eb273d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250825/202508251245.Y24eUGc5-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/202508251245.Y24eUGc5-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/smb/server/transport_tcp.c:262:47: error: no member named 'skc_v6_daddr' in 'struct sock_common'
     262 |                         inet_hash = ipv6_addr_hash(&client_sk->sk->sk_v6_daddr);
         |                                                     ~~~~~~~~~~~~~~~^~~~~~~~~~~
   include/net/sock.h:384:34: note: expanded from macro 'sk_v6_daddr'
     384 | #define sk_v6_daddr             __sk_common.skc_v6_daddr
         |                                             ^
   1 error generated.


vim +262 fs/smb/server/transport_tcp.c

   228	
   229	/**
   230	 * ksmbd_kthread_fn() - listen to new SMB connections and callback server
   231	 * @p:		arguments to forker thread
   232	 *
   233	 * Return:	0 on success, error number otherwise
   234	 */
   235	static int ksmbd_kthread_fn(void *p)
   236	{
   237		struct socket *client_sk = NULL;
   238		struct interface *iface = (struct interface *)p;
   239		struct ksmbd_conn *conn;
   240		int ret, inet_hash;
   241	
   242		while (!kthread_should_stop()) {
   243			mutex_lock(&iface->sock_release_lock);
   244			if (!iface->ksmbd_socket) {
   245				mutex_unlock(&iface->sock_release_lock);
   246				break;
   247			}
   248			ret = kernel_accept(iface->ksmbd_socket, &client_sk,
   249					    SOCK_NONBLOCK);
   250			mutex_unlock(&iface->sock_release_lock);
   251			if (ret) {
   252				if (ret == -EAGAIN)
   253					/* check for new connections every 100 msecs */
   254					schedule_timeout_interruptible(HZ / 10);
   255				continue;
   256			}
   257	
   258			/*
   259			 * Limits repeated connections from clients with the same IP.
   260			 */
   261			if (client_sk->sk->sk_family == AF_INET6)
 > 262				inet_hash = ipv6_addr_hash(&client_sk->sk->sk_v6_daddr);
   263			else
   264				inet_hash = ipv4_addr_hash(inet_sk(client_sk->sk)->inet_daddr);
   265			down_read(&conn_list_lock);
   266			hash_for_each_possible(conn_list, conn, hlist, inet_hash) {
   267	#if IS_ENABLED(CONFIG_IPV6)
   268				if (client_sk->sk->sk_family == AF_INET6) {
   269					if (memcmp(&client_sk->sk->sk_v6_daddr,
   270						   &conn->inet6_addr, 16) == 0) {
   271						ret = -EAGAIN;
   272						break;
   273					}
   274				} else if (inet_sk(client_sk->sk)->inet_daddr ==
   275					 conn->inet_addr) {
   276					ret = -EAGAIN;
   277					break;
   278				}
   279	#else
   280				if (inet_sk(client_sk->sk)->inet_daddr ==
   281				    conn->inet_addr) {
   282					ret = -EAGAIN;
   283					break;
   284				}
   285	#endif
   286			}
   287			up_read(&conn_list_lock);
   288			if (ret == -EAGAIN)
   289				continue;
   290	
   291			if (server_conf.max_connections &&
   292			    atomic_inc_return(&active_num_conn) >= server_conf.max_connections) {
   293				pr_info_ratelimited("Limit the maximum number of connections(%u)\n",
   294						    atomic_read(&active_num_conn));
   295				atomic_dec(&active_num_conn);
   296				sock_release(client_sk);
   297				continue;
   298			}
   299	
   300			ksmbd_debug(CONN, "connect success: accepted new connection\n");
   301			client_sk->sk->sk_rcvtimeo = KSMBD_TCP_RECV_TIMEOUT;
   302			client_sk->sk->sk_sndtimeo = KSMBD_TCP_SEND_TIMEOUT;
   303	
   304			ksmbd_tcp_new_connection(client_sk);
   305		}
   306	
   307		ksmbd_debug(CONN, "releasing socket\n");
   308		return 0;
   309	}
   310	

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

                 reply	other threads:[~2025-08-25  4:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508251245.Y24eUGc5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stfrench@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.