BCC: l...@intel.com CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Stephan Gerhold <step...@gerhold.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6614a3c3164a5df2b54abb0b3559f51041cf705b commit: 21a0ffd9b38c61d79b5ade54893b0f59f2e8c2c3 net: wwan: Add Qualcomm BAM-DMUX WWAN network driver date: 8 months ago :::::: branch date: 20 hours ago :::::: commit date: 8 months ago config: openrisc-randconfig-m031-20220801 (https://download.01.org/0day-ci/archive/20220807/202208070356.1gnhftii-...@intel.com/config) compiler: or1k-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <l...@intel.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> smatch warnings: drivers/net/wwan/qcom_bam_dmux.c:507 bam_dmux_cmd_data() warn: potential spectre issue 'dmux->netdevs' [r] drivers/net/wwan/qcom_bam_dmux.c:509 bam_dmux_cmd_data() warn: possible spectre second half. 'netdev' vim +507 drivers/net/wwan/qcom_bam_dmux.c 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 501 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 502 static void bam_dmux_cmd_data(struct bam_dmux_skb_dma *skb_dma) 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 503 { 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 504 struct bam_dmux *dmux = skb_dma->dmux; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 505 struct sk_buff *skb = skb_dma->skb; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 506 struct bam_dmux_hdr *hdr = (struct bam_dmux_hdr *)skb->data; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 @507 struct net_device *netdev = dmux->netdevs[hdr->ch]; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 508 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 @509 if (!netdev || !netif_running(netdev)) { 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 510 dev_warn(dmux->dev, "Data for inactive channel %u\n", hdr->ch); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 511 return; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 512 } 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 513 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 514 if (hdr->len > BAM_DMUX_MAX_DATA_SIZE) { 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 515 dev_err(dmux->dev, "Data larger than buffer? (%u > %u)\n", 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 516 hdr->len, (u16)BAM_DMUX_MAX_DATA_SIZE); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 517 return; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 518 } 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 519 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 520 skb_dma->skb = NULL; /* Hand over to network stack */ 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 521 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 522 skb_pull(skb, sizeof(*hdr)); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 523 skb_trim(skb, hdr->len); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 524 skb->dev = netdev; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 525 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 526 /* Only Raw-IP/QMAP is supported by this driver */ 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 527 switch (skb->data[0] & 0xf0) { 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 528 case 0x40: 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 529 skb->protocol = htons(ETH_P_IP); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 530 break; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 531 case 0x60: 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 532 skb->protocol = htons(ETH_P_IPV6); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 533 break; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 534 default: 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 535 skb->protocol = htons(ETH_P_MAP); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 536 break; 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 537 } 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 538 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 539 netif_receive_skb(skb); 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 540 } 21a0ffd9b38c61 Stephan Gerhold 2021-11-27 541 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org