* [hare-scsi-devel:tls-netlink.v8 17/20] drivers/nvme/target/tcp.c:1801:1: warning: label 'out_free_queue' defined but not used
@ 2023-03-29 20:20 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-29 20:20 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-netlink.v8
head: b160cccb84362674ac09fb349ab21bd2339eb28e
commit: 1cf4b56e63dd687ede53ffa0d0766afa5e1f6cc2 [17/20] nvmet-tcp: enable TLS handshake upcall
config: x86_64-randconfig-a015 (https://download.01.org/0day-ci/archive/20230330/202303300418.ImspUHXP-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=1cf4b56e63dd687ede53ffa0d0766afa5e1f6cc2
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel tls-netlink.v8
git checkout 1cf4b56e63dd687ede53ffa0d0766afa5e1f6cc2
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/nvme/target/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303300418.ImspUHXP-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/nvme/target/tcp.c: In function 'nvmet_tcp_alloc_queue':
>> drivers/nvme/target/tcp.c:1801:1: warning: label 'out_free_queue' defined but not used [-Wunused-label]
1801 | out_free_queue:
| ^~~~~~~~~~~~~~
vim +/out_free_queue +1801 drivers/nvme/target/tcp.c
1368784072dae6f Hannes Reinecke 2023-03-04 1748
44f331a630bdc7c Sagi Grimberg 2022-02-14 1749 queue->idx = ida_alloc(&nvmet_tcp_queue_ida, GFP_KERNEL);
872d26a391da92e Sagi Grimberg 2018-12-03 1750 if (queue->idx < 0) {
872d26a391da92e Sagi Grimberg 2018-12-03 1751 ret = queue->idx;
1368784072dae6f Hannes Reinecke 2023-03-04 1752 goto out_sock;
872d26a391da92e Sagi Grimberg 2018-12-03 1753 }
872d26a391da92e Sagi Grimberg 2018-12-03 1754
872d26a391da92e Sagi Grimberg 2018-12-03 1755 ret = nvmet_tcp_alloc_cmd(queue, &queue->connect);
872d26a391da92e Sagi Grimberg 2018-12-03 1756 if (ret)
872d26a391da92e Sagi Grimberg 2018-12-03 1757 goto out_ida_remove;
872d26a391da92e Sagi Grimberg 2018-12-03 1758
872d26a391da92e Sagi Grimberg 2018-12-03 1759 ret = nvmet_sq_init(&queue->nvme_sq);
872d26a391da92e Sagi Grimberg 2018-12-03 1760 if (ret)
872d26a391da92e Sagi Grimberg 2018-12-03 1761 goto out_free_connect;
872d26a391da92e Sagi Grimberg 2018-12-03 1762
872d26a391da92e Sagi Grimberg 2018-12-03 1763 nvmet_prepare_receive_pdu(queue);
872d26a391da92e Sagi Grimberg 2018-12-03 1764
872d26a391da92e Sagi Grimberg 2018-12-03 1765 mutex_lock(&nvmet_tcp_queue_mutex);
872d26a391da92e Sagi Grimberg 2018-12-03 1766 list_add_tail(&queue->queue_list, &nvmet_tcp_queue_list);
872d26a391da92e Sagi Grimberg 2018-12-03 1767 mutex_unlock(&nvmet_tcp_queue_mutex);
872d26a391da92e Sagi Grimberg 2018-12-03 1768
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1769 #ifdef CONFIG_NVME_TLS
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1770 if (queue->state == NVMET_TCP_Q_TLS_HANDSHAKE) {
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1771 struct sock *sk = queue->sock->sk;
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1772
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1773 /* Restore the default callbacks before starting upcall */
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1774 read_lock_bh(&sk->sk_callback_lock);
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1775 sk->sk_user_data = NULL;
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1776 sk->sk_data_ready = port->data_ready;
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1777 read_unlock_bh(&sk->sk_callback_lock);
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1778 if (!nvmet_tcp_tls_handshake(queue))
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1779 return;
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1780
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1781 /* TLS handshake failed, terminate the connection */
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1782 goto out_destroy_sq;
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1783 }
1cf4b56e63dd687 Hannes Reinecke 2023-02-14 1784 #endif
872d26a391da92e Sagi Grimberg 2018-12-03 1785 ret = nvmet_tcp_set_queue_sock(queue);
872d26a391da92e Sagi Grimberg 2018-12-03 1786 if (ret)
872d26a391da92e Sagi Grimberg 2018-12-03 1787 goto out_destroy_sq;
872d26a391da92e Sagi Grimberg 2018-12-03 1788
1368784072dae6f Hannes Reinecke 2023-03-04 1789 return;
872d26a391da92e Sagi Grimberg 2018-12-03 1790 out_destroy_sq:
872d26a391da92e Sagi Grimberg 2018-12-03 1791 mutex_lock(&nvmet_tcp_queue_mutex);
872d26a391da92e Sagi Grimberg 2018-12-03 1792 list_del_init(&queue->queue_list);
872d26a391da92e Sagi Grimberg 2018-12-03 1793 mutex_unlock(&nvmet_tcp_queue_mutex);
872d26a391da92e Sagi Grimberg 2018-12-03 1794 nvmet_sq_destroy(&queue->nvme_sq);
872d26a391da92e Sagi Grimberg 2018-12-03 1795 out_free_connect:
872d26a391da92e Sagi Grimberg 2018-12-03 1796 nvmet_tcp_free_cmd(&queue->connect);
872d26a391da92e Sagi Grimberg 2018-12-03 1797 out_ida_remove:
44f331a630bdc7c Sagi Grimberg 2022-02-14 1798 ida_free(&nvmet_tcp_queue_ida, queue->idx);
1368784072dae6f Hannes Reinecke 2023-03-04 1799 out_sock:
1368784072dae6f Hannes Reinecke 2023-03-04 1800 nvmet_tcp_close_sock(queue);
872d26a391da92e Sagi Grimberg 2018-12-03 @1801 out_free_queue:
872d26a391da92e Sagi Grimberg 2018-12-03 1802 kfree(queue);
1368784072dae6f Hannes Reinecke 2023-03-04 1803 pr_err("failed to allocate queue");
872d26a391da92e Sagi Grimberg 2018-12-03 1804 }
872d26a391da92e Sagi Grimberg 2018-12-03 1805
:::::: The code at line 1801 was first introduced by commit
:::::: 872d26a391da92ed8f0c0f5cb5fef428067b7f30 nvmet-tcp: add NVMe over TCP target driver
:::::: TO: Sagi Grimberg <sagi@lightbitslabs.com>
:::::: CC: Christoph Hellwig <hch@lst.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-29 20:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29 20:20 [hare-scsi-devel:tls-netlink.v8 17/20] drivers/nvme/target/tcp.c:1801:1: warning: label 'out_free_queue' defined but not used 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.