tree: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main head: 1b431ba4ef9a760e7643d6fbc53bf522d59650f3 commit: adc902ceada26add77ad75426805e973a7c67f01 [8/21] wifi: iwlwifi: keep the TSO and workaround pages mapped config: x86_64-randconfig-161-20240706 (https://download.01.org/0day-ci/archive/20240706/202407062135.NNjnmMdR-lkp@xxxxxxxxx/config) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 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@xxxxxxxxx> | Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> | Closes: https://lore.kernel.org/r/202407062135.NNjnmMdR-lkp@xxxxxxxxx/ New smatch warnings: drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1764 iwl_pcie_get_page_hdr() error: uninitialized symbol 'ret'. vim +/ret +1764 drivers/net/wireless/intel/iwlwifi/pcie/tx.c 7f5e3038f02902 Benjamin Berg 2024-07-03 1735 static void *iwl_pcie_get_page_hdr(struct iwl_trans *trans, 49101078be769e Johannes Berg 2024-06-05 1736 size_t len, struct sk_buff *skb) 49101078be769e Johannes Berg 2024-06-05 1737 { 49101078be769e Johannes Berg 2024-06-05 1738 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 49101078be769e Johannes Berg 2024-06-05 1739 struct iwl_tso_hdr_page *p = this_cpu_ptr(trans_pcie->txqs.tso_hdr_page); adc902ceada26a Benjamin Berg 2024-07-03 1740 struct iwl_tso_page_info *info; 49101078be769e Johannes Berg 2024-06-05 1741 struct page **page_ptr; adc902ceada26a Benjamin Berg 2024-07-03 1742 dma_addr_t phys; d023a228e927c1 Benjamin Berg 2024-07-03 1743 void *ret; 49101078be769e Johannes Berg 2024-06-05 1744 49101078be769e Johannes Berg 2024-06-05 1745 page_ptr = (void *)((u8 *)skb->cb + trans_pcie->txqs.page_offs); 49101078be769e Johannes Berg 2024-06-05 1746 49101078be769e Johannes Berg 2024-06-05 1747 if (WARN_ON(*page_ptr)) 49101078be769e Johannes Berg 2024-06-05 1748 return NULL; 49101078be769e Johannes Berg 2024-06-05 1749 49101078be769e Johannes Berg 2024-06-05 1750 if (!p->page) 49101078be769e Johannes Berg 2024-06-05 1751 goto alloc; 49101078be769e Johannes Berg 2024-06-05 1752 49101078be769e Johannes Berg 2024-06-05 1753 /* 49101078be769e Johannes Berg 2024-06-05 1754 * Check if there's enough room on this page 49101078be769e Johannes Berg 2024-06-05 1755 * 49101078be769e Johannes Berg 2024-06-05 1756 * Note that we put a page chaining pointer *last* in the 49101078be769e Johannes Berg 2024-06-05 1757 * page - we need it somewhere, and if it's there then we 49101078be769e Johannes Berg 2024-06-05 1758 * avoid DMA mapping the last bits of the page which may 49101078be769e Johannes Berg 2024-06-05 1759 * trigger the 32-bit boundary hardware bug. 49101078be769e Johannes Berg 2024-06-05 1760 * 49101078be769e Johannes Berg 2024-06-05 1761 * (see also get_workaround_page() in tx-gen2.c) 49101078be769e Johannes Berg 2024-06-05 1762 */ adc902ceada26a Benjamin Berg 2024-07-03 1763 if (((unsigned long)p->pos & ~PAGE_MASK) + len < IWL_TSO_PAGE_DATA_SIZE) { adc902ceada26a Benjamin Berg 2024-07-03 @1764 info = IWL_TSO_PAGE_INFO(page_address(ret)); ret is uninitialized 49101078be769e Johannes Berg 2024-06-05 1765 goto out; adc902ceada26a Benjamin Berg 2024-07-03 1766 } 49101078be769e Johannes Berg 2024-06-05 1767 49101078be769e Johannes Berg 2024-06-05 1768 /* We don't have enough room on this page, get a new one. */ adc902ceada26a Benjamin Berg 2024-07-03 1769 iwl_pcie_free_and_unmap_tso_page(trans, p->page); 49101078be769e Johannes Berg 2024-06-05 1770 49101078be769e Johannes Berg 2024-06-05 1771 alloc: 49101078be769e Johannes Berg 2024-06-05 1772 p->page = alloc_page(GFP_ATOMIC); 49101078be769e Johannes Berg 2024-06-05 1773 if (!p->page) 49101078be769e Johannes Berg 2024-06-05 1774 return NULL; 49101078be769e Johannes Berg 2024-06-05 1775 p->pos = page_address(p->page); adc902ceada26a Benjamin Berg 2024-07-03 1776 adc902ceada26a Benjamin Berg 2024-07-03 1777 info = IWL_TSO_PAGE_INFO(page_address(ret)); Here too adc902ceada26a Benjamin Berg 2024-07-03 1778 49101078be769e Johannes Berg 2024-06-05 1779 /* set the chaining pointer to NULL */ adc902ceada26a Benjamin Berg 2024-07-03 1780 info->next = NULL; adc902ceada26a Benjamin Berg 2024-07-03 1781 adc902ceada26a Benjamin Berg 2024-07-03 1782 /* Create a DMA mapping for the page */ adc902ceada26a Benjamin Berg 2024-07-03 1783 phys = dma_map_page_attrs(trans->dev, p->page, 0, PAGE_SIZE, adc902ceada26a Benjamin Berg 2024-07-03 1784 DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC); adc902ceada26a Benjamin Berg 2024-07-03 1785 if (unlikely(dma_mapping_error(trans->dev, phys))) { adc902ceada26a Benjamin Berg 2024-07-03 1786 __free_page(p->page); adc902ceada26a Benjamin Berg 2024-07-03 1787 p->page = NULL; adc902ceada26a Benjamin Berg 2024-07-03 1788 adc902ceada26a Benjamin Berg 2024-07-03 1789 return NULL; adc902ceada26a Benjamin Berg 2024-07-03 1790 } adc902ceada26a Benjamin Berg 2024-07-03 1791 adc902ceada26a Benjamin Berg 2024-07-03 1792 /* Store physical address and set use count */ adc902ceada26a Benjamin Berg 2024-07-03 1793 info->dma_addr = phys; adc902ceada26a Benjamin Berg 2024-07-03 1794 refcount_set(&info->use_count, 1); 49101078be769e Johannes Berg 2024-06-05 1795 out: 49101078be769e Johannes Berg 2024-06-05 1796 *page_ptr = p->page; adc902ceada26a Benjamin Berg 2024-07-03 1797 /* Return an internal reference for the caller */ adc902ceada26a Benjamin Berg 2024-07-03 1798 refcount_inc(&info->use_count); d023a228e927c1 Benjamin Berg 2024-07-03 1799 ret = p->pos; d023a228e927c1 Benjamin Berg 2024-07-03 1800 p->pos += len; d023a228e927c1 Benjamin Berg 2024-07-03 1801 d023a228e927c1 Benjamin Berg 2024-07-03 1802 return ret; 49101078be769e Johannes Berg 2024-06-05 1803 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki