mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

March 2025

  • 65 participants
  • 496 discussions
[openeuler:OLK-5.10 2816/2816] drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 762816c3c07e052877c68911685e3700fe073298 commit: e53494b741272933726616122ea77143d9742631 [2816/2816] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250320/202503201925.S7VuFUSk-lkp@…) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201925.S7VuFUSk-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503201925.S7VuFUSk-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:6: warning: no previous prototype for function 'rnp_unmap_and_free_tx_resource' [-Wmissing-prototypes] 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:669:5: warning: no previous prototype for function 'rnp_rx_ring_reinit' [-Wmissing-prototypes] 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:1777:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1777 | bool xdp_xmit = false; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:6: warning: no previous prototype for function 'rnp_write_eitr_rx' [-Wmissing-prototypes] 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:2818:6: warning: variable 'rxctrl' set but not used [-Wunused-but-set-variable] 2818 | u32 rxctrl = 0, dma_axi_ctl; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:6: warning: no previous prototype for function 'rnp_vlan_stags_flag' [-Wmissing-prototypes] 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:5: warning: no previous prototype for function 'rnp_xmit_nop_frame_ring' [-Wmissing-prototypes] 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:6: warning: no previous prototype for function 'rnp_service_timer' [-Wmissing-prototypes] 4811 | void rnp_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4811 | void rnp_service_timer(struct timer_list *t) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:6: warning: no previous prototype for function 'rnp_service_task' [-Wmissing-prototypes] 4919 | void rnp_service_task(struct work_struct *work) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4919 | void rnp_service_task(struct work_struct *work) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:5: warning: no previous prototype for function 'rnp_delete_knode' [-Wmissing-prototypes] 5941 | int rnp_delete_knode(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5941 | int rnp_delete_knode(struct net_device *dev, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:5: warning: no previous prototype for function 'rnp_config_knode' [-Wmissing-prototypes] 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:5: warning: no previous prototype for function 'rnp_setup_tc_cls_u32' [-Wmissing-prototypes] 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:6: warning: no previous prototype for function 'rnp_do_reset' [-Wmissing-prototypes] 6166 | void rnp_do_reset(struct net_device *netdev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit -- In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ 6 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:5: warning: no previous prototype for function 'rnp_acquire_msix_vectors' [-Wmissing-prototypes] 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:6: warning: no previous prototype for function 'rnp_print_ring_info' [-Wmissing-prototypes] 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ | static 8 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_n10.c:8: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_n10.c:8: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:122:5: warning: no previous prototype for function 'rnp_eth_set_rar_n10' [-Wmissing-prototypes] 122 | s32 rnp_eth_set_rar_n10(struct rnp_eth_info *eth, u32 index, u8 *addr, | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 122 | s32 rnp_eth_set_rar_n10(struct rnp_eth_info *eth, u32 index, u8 *addr, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:179:5: warning: no previous prototype for function 'rnp_eth_clear_rar_n10' [-Wmissing-prototypes] 179 | s32 rnp_eth_clear_rar_n10(struct rnp_eth_info *eth, u32 index) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 179 | s32 rnp_eth_clear_rar_n10(struct rnp_eth_info *eth, u32 index) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:214:5: warning: no previous prototype for function 'rnp_eth_set_vmdq_n10' [-Wmissing-prototypes] 214 | s32 rnp_eth_set_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 214 | s32 rnp_eth_set_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:244:5: warning: no previous prototype for function 'rnp_eth_clear_vmdq_n10' [-Wmissing-prototypes] 244 | s32 rnp_eth_clear_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:244:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 244 | s32 rnp_eth_clear_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:328:5: warning: no previous prototype for function 'rnp_addr_list_itr' [-Wmissing-prototypes] 328 | u8 *rnp_addr_list_itr(struct rnp_hw __maybe_unused *hw, u8 **mc_addr_ptr) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:328:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 328 | u8 *rnp_addr_list_itr(struct rnp_hw __maybe_unused *hw, u8 **mc_addr_ptr) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:359:5: warning: no previous prototype for function 'rnp_eth_update_mc_addr_list_n10' [-Wmissing-prototypes] 359 | s32 rnp_eth_update_mc_addr_list_n10(struct rnp_eth_info *eth, | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:359:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 359 | s32 rnp_eth_update_mc_addr_list_n10(struct rnp_eth_info *eth, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:442:6: warning: no previous prototype for function 'rnp_eth_clr_mc_addr_n10' [-Wmissing-prototypes] 442 | void rnp_eth_clr_mc_addr_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:442:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 442 | void rnp_eth_clr_mc_addr_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:457:6: warning: no previous prototype for function 'rnp_eth_update_rss_key_n10' [-Wmissing-prototypes] 457 | void rnp_eth_update_rss_key_n10(struct rnp_eth_info *eth, bool sriov_flag) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:457:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 457 | void rnp_eth_update_rss_key_n10(struct rnp_eth_info *eth, bool sriov_flag) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:486:6: warning: no previous prototype for function 'rnp_eth_update_rss_table_n10' [-Wmissing-prototypes] 486 | void rnp_eth_update_rss_table_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:486:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 486 | void rnp_eth_update_rss_table_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:511:5: warning: no previous prototype for function 'rnp_eth_set_vfta_n10' [-Wmissing-prototypes] 511 | s32 rnp_eth_set_vfta_n10(struct rnp_eth_info *eth, u32 vlan, bool vlan_on) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:511:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 511 | s32 rnp_eth_set_vfta_n10(struct rnp_eth_info *eth, u32 vlan, bool vlan_on) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:551:6: warning: no previous prototype for function 'rnp_eth_clr_vfta_n10' [-Wmissing-prototypes] 551 | void rnp_eth_clr_vfta_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:551:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 551 | void rnp_eth_clr_vfta_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:577:5: warning: no previous prototype for function 'rnp_layer2_pritologic_n10' [-Wmissing-prototypes] 577 | u16 rnp_layer2_pritologic_n10(u16 hw_id) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:577:1: note: declare 'static' if the function is not intended to be used outside of this translation unit -- In file included from drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:9: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:9: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1100:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] 1100 | int err; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1140:6: warning: variable 'value' set but not used [-Wunused-but-set-variable] 1140 | int value; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1136:5: warning: no previous prototype for function 'rnp_fw_reg_read' [-Wmissing-prototypes] 1136 | int rnp_fw_reg_read(struct rnp_hw *hw, int addr, int sz) | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1136 | int rnp_fw_reg_read(struct rnp_hw *hw, int addr, int sz) | ^ | static 9 warnings generated. .. vim +/int +898 drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h 879 880 static inline void build_set_phy_reg(struct mbx_fw_cmd_req *req, 881 void *cookie, 882 enum PHY_INTERFACE phy_inf, 883 char nr_lane, int reg, int w_data, 884 int recall_qsfp_page) 885 { 886 req->flags = 0; 887 req->opcode = SET_PHY_REG; 888 req->datalen = sizeof(req->set_phy_reg); 889 req->cookie = cookie; 890 req->reply_lo = 0; 891 req->reply_hi = 0; 892 req->set_phy_reg.phy_interface = phy_inf; 893 req->set_phy_reg.nr_lane = nr_lane; 894 req->set_phy_reg.phy_reg_addr = reg; 895 req->set_phy_reg.phy_w_data = w_data; 896 897 if (recall_qsfp_page) > 898 req->set_phy_reg.recall_qsfp_page = 1; 899 else 900 req->set_phy_reg.recall_qsfp_page = 0; 901 } 902 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1509/1509] net/netfilter/ipvs/ip_vs_ctl.c:2480:9: warning: 'ret' may be used uninitialized in this function
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d54ba3f54612a8622df13d42bc1870048cb63d20 commit: 56ee6566622b8a8f58ec8d99e403d4ba9f29e693 [1509/1509] ipvs: Fix uninit-value in do_ip_vs_set_ctl() config: arm64-randconfig-002-20250320 (https://download.01.org/0day-ci/archive/20250320/202503201839.XDDCG7DI-lkp@…) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201839.XDDCG7DI-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503201839.XDDCG7DI-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): net/netfilter/ipvs/ip_vs_ctl.c: In function 'do_ip_vs_set_ctl': >> net/netfilter/ipvs/ip_vs_ctl.c:2480:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] 2480 | return ret; | ^~~ vim +/ret +2480 net/netfilter/ipvs/ip_vs_ctl.c c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2337 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2338 static int ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2339 do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2340 { fc723250c9cb04 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-01-03 2341 struct net *net = sock_net(sk); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2342 int ret; 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2343 unsigned char arg[MAX_SET_ARGLEN]; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2344 struct ip_vs_service_user *usvc_compat; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2345 struct ip_vs_service_user_kern usvc; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2346 struct ip_vs_service *svc; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2347 struct ip_vs_dest_user *udest_compat; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2348 struct ip_vs_dest_user_kern udest; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2349 struct netns_ipvs *ipvs = net_ipvs(net); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2350 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2351 BUILD_BUG_ON(sizeof(arg) > 255); df008c91f83583 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2012-11-16 2352 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2353 return -EPERM; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2354 04bcef2a83f40c net/netfilter/ipvs/ip_vs_ctl.c Arjan van de Ven 2010-01-04 2355 if (cmd < IP_VS_BASE_CTL || cmd > IP_VS_SO_SET_MAX) 04bcef2a83f40c net/netfilter/ipvs/ip_vs_ctl.c Arjan van de Ven 2010-01-04 2356 return -EINVAL; 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2357 if (len != set_arglen[CMDID(cmd)]) { 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2358 IP_VS_DBG(1, "set_ctl: len %u != %u\n", 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2359 len, set_arglen[CMDID(cmd)]); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2360 return -EINVAL; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2361 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2362 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2363 if (copy_from_user(arg, user, len) != 0) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2364 return -EFAULT; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2365 ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2366 /* Handle daemons since they have another lock */ ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2367 if (cmd == IP_VS_SO_SET_STARTDAEMON || ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2368 cmd == IP_VS_SO_SET_STOPDAEMON) { ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2369 struct ip_vs_daemon_user *dm = (struct ip_vs_daemon_user *)arg; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2370 e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2371 if (cmd == IP_VS_SO_SET_STARTDAEMON) { e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2372 struct ipvs_sync_daemon_cfg cfg; e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2373 e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2374 memset(&cfg, 0, sizeof(cfg)); 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2375 ret = -EINVAL; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2376 if (strscpy(cfg.mcast_ifn, dm->mcast_ifn, 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2377 sizeof(cfg.mcast_ifn)) <= 0) e2eda307807970 net/netfilter/ipvs/ip_vs_ctl.c Davide Caratti 2019-11-13 2378 return ret; e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2379 cfg.syncid = dm->syncid; 6ac121d710697c net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2380 ret = start_sync_thread(ipvs, &cfg, dm->state); e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2381 } else { b3cf3cbfb57c27 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2382 ret = stop_sync_thread(ipvs, dm->state); e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2383 } e2eda307807970 net/netfilter/ipvs/ip_vs_ctl.c Davide Caratti 2019-11-13 2384 return ret; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2385 } ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2386 7926dbfa4bc14e net/netfilter/ipvs/ip_vs_ctl.c Pablo Neira Ayuso 2014-07-31 2387 mutex_lock(&__ip_vs_mutex); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2388 if (cmd == IP_VS_SO_SET_FLUSH) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2389 /* Flush the virtual service */ ef7c599d91172d net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2390 ret = ip_vs_flush(ipvs, false); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2391 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2392 } else if (cmd == IP_VS_SO_SET_TIMEOUT) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2393 /* Set timeout values for (tcp tcpfin udp) */ f1faa1e7495445 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2394 ret = ip_vs_set_timeout(ipvs, (struct ip_vs_timeout_user *)arg); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2395 goto out_unlock; 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2396 } else if (!len) { 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2397 /* No more commands with len == 0 below */ 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2398 ret = -EINVAL; 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2399 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2400 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2401 c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2402 usvc_compat = (struct ip_vs_service_user *)arg; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2403 udest_compat = (struct ip_vs_dest_user *)(usvc_compat + 1); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2404 c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2405 /* We only use the new structs internally, so copy userspace compat c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2406 * structs to extended internal versions */ c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2407 ip_vs_copy_usvc_compat(&usvc, usvc_compat); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2408 ip_vs_copy_udest_compat(&udest, udest_compat); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2409 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2410 if (cmd == IP_VS_SO_SET_ZERO) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2411 /* if no service address is set, zero counters in all */ c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2412 if (!usvc.fwmark && !usvc.addr.ip && !usvc.port) { c60856c687d601 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2413 ret = ip_vs_zero_all(ipvs); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2414 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2415 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2416 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2417 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2418 if ((cmd == IP_VS_SO_SET_ADD || cmd == IP_VS_SO_SET_EDIT) && 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2419 strnlen(usvc.sched_name, IP_VS_SCHEDNAME_MAXLEN) == 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2420 IP_VS_SCHEDNAME_MAXLEN) { 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2421 ret = -EINVAL; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2422 goto out_unlock; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2423 } 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2424 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2425 /* Check for valid protocol: TCP or UDP or SCTP, even for fwmark!=0 */ 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2426 if (usvc.protocol != IPPROTO_TCP && usvc.protocol != IPPROTO_UDP && 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2427 usvc.protocol != IPPROTO_SCTP) { 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2428 pr_err("set_ctl: invalid protocol: %d %pI4:%d\n", 14d5e834f6b366 net/netfilter/ipvs/ip_vs_ctl.c Harvey Harrison 2008-10-31 2429 usvc.protocol, &usvc.addr.ip, 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2430 ntohs(usvc.port)); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2431 ret = -EFAULT; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2432 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2433 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2434 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2435 /* Lookup the exact service by <protocol, addr, port> or fwmark */ ceec4c38168184 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2013-03-22 2436 rcu_read_lock(); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2437 if (usvc.fwmark == 0) bb2e2a8c957fd1 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2438 svc = __ip_vs_service_find(ipvs, usvc.af, usvc.protocol, b18610de9ec272 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2439 &usvc.addr, usvc.port); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2440 else 1ed8b947806155 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2441 svc = __ip_vs_svc_fwm_find(ipvs, usvc.af, usvc.fwmark); ceec4c38168184 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2013-03-22 2442 rcu_read_unlock(); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2443 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2444 if (cmd != IP_VS_SO_SET_ADD c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2445 && (svc == NULL || svc->protocol != usvc.protocol)) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2446 ret = -ESRCH; 26c15cfd291f8b net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2010-09-21 2447 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2448 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2449 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2450 switch (cmd) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2451 case IP_VS_SO_SET_ADD: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2452 if (svc != NULL) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2453 ret = -EEXIST; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2454 else 5060bd8307fcfb net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2455 ret = ip_vs_add_service(ipvs, &usvc, &svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2456 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2457 case IP_VS_SO_SET_EDIT: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2458 ret = ip_vs_edit_service(svc, &usvc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2459 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2460 case IP_VS_SO_SET_DEL: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2461 ret = ip_vs_del_service(svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2462 if (!ret) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2463 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2464 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2465 case IP_VS_SO_SET_ZERO: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2466 ret = ip_vs_zero_service(svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2467 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2468 case IP_VS_SO_SET_ADDDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2469 ret = ip_vs_add_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2470 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2471 case IP_VS_SO_SET_EDITDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2472 ret = ip_vs_edit_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2473 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2474 case IP_VS_SO_SET_DELDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2475 ret = ip_vs_del_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2476 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2477 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2478 out_unlock: 14cc3e2b633bb6 net/ipv4/ipvs/ip_vs_ctl.c Ingo Molnar 2006-03-26 2479 mutex_unlock(&__ip_vs_mutex); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 @2480 return ret; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2481 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2482 :::::: The code at line 2480 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org> :::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1509/1509] drivers/dma/pl330.c:2599:15: warning: 'src' may be used uninitialized in this function
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d54ba3f54612a8622df13d42bc1870048cb63d20 commit: 0299853c014aa0eecf7fb85ac2f1ebd0a9a6ba73 [1509/1509] dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV config: arm64-randconfig-003-20250320 (https://download.01.org/0day-ci/archive/20250320/202503201721.gZeymcpc-lkp@…) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201721.gZeymcpc-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503201721.gZeymcpc-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/dma/pl330.c: In function 'pl330_prep_dma_cyclic': >> drivers/dma/pl330.c:2599:15: warning: 'src' may be used uninitialized in this function [-Wmaybe-uninitialized] 2599 | px->src_addr = src; | ~~~~~~~~~~~~~^~~~~ drivers/dma/pl330.c:2657:13: note: 'src' was declared here 2657 | dma_addr_t src; | ^~~ >> drivers/dma/pl330.c:2598:15: warning: 'dst' may be used uninitialized in this function [-Wmaybe-uninitialized] 2598 | px->dst_addr = dst; | ~~~~~~~~~~~~~^~~~~ drivers/dma/pl330.c:2656:13: note: 'dst' was declared here 2656 | dma_addr_t dst; | ^~~ drivers/dma/pl330.c:297: warning: cannot understand function prototype: 'struct pl330_reqcfg ' vim +/src +2599 drivers/dma/pl330.c b3040e40675ec2c Jassi Brar 2010-05-23 2593 b3040e40675ec2c Jassi Brar 2010-05-23 2594 static inline void fill_px(struct pl330_xfer *px, b3040e40675ec2c Jassi Brar 2010-05-23 2595 dma_addr_t dst, dma_addr_t src, size_t len) b3040e40675ec2c Jassi Brar 2010-05-23 2596 { b3040e40675ec2c Jassi Brar 2010-05-23 2597 px->bytes = len; b3040e40675ec2c Jassi Brar 2010-05-23 @2598 px->dst_addr = dst; b3040e40675ec2c Jassi Brar 2010-05-23 @2599 px->src_addr = src; b3040e40675ec2c Jassi Brar 2010-05-23 2600 } b3040e40675ec2c Jassi Brar 2010-05-23 2601 :::::: The code at line 2599 was first introduced by commit :::::: b3040e40675ec2c43542331cd30d4ee3dae797e8 DMA: PL330: Add dma api driver :::::: TO: Jassi Brar <jassi.brar(a)samsung.com> :::::: CC: Dan Williams <dan.j.williams(a)intel.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2045/2045] arch/arm64/kvm/virtcca_cvm.c:810:5: warning: no previous prototype for function 'virtcca_get_tmi_version'
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 961f596cd0017f5f254fb4b0ab9f5b9975177b84 commit: 86b9cab8c4752eb46e3ec038325aee5686805c69 [2045/2045] VirtCCA: an interface to retrieve the TMI version is added config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250320/202503201027.i8HE43EJ-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201027.i8HE43EJ-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503201027.i8HE43EJ-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/arm64/kvm/virtcca_cvm.c:5: In file included from include/linux/kvm_host.h:16: In file included from include/linux/mm.h:2253: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/virtcca_cvm.c:810:5: warning: no previous prototype for function 'virtcca_get_tmi_version' [-Wmissing-prototypes] 810 | u64 virtcca_get_tmi_version(void) | ^ arch/arm64/kvm/virtcca_cvm.c:810:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 810 | u64 virtcca_get_tmi_version(void) | ^ | static arch/arm64/kvm/virtcca_cvm.c:1274:5: warning: no previous prototype for function 'cvm_arm_smmu_domain_set_kvm' [-Wmissing-prototypes] 1274 | int cvm_arm_smmu_domain_set_kvm(struct device *dev, void *data) | ^ arch/arm64/kvm/virtcca_cvm.c:1274:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1274 | int cvm_arm_smmu_domain_set_kvm(struct device *dev, void *data) | ^ | static 7 warnings generated. vim +/virtcca_get_tmi_version +810 arch/arm64/kvm/virtcca_cvm.c 809 > 810 u64 virtcca_get_tmi_version(void) 811 { 812 u64 res = tmi_version(); 813 814 if (res == SMCCC_RET_NOT_SUPPORTED) 815 return 0; 816 return res; 817 } 818 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2045/2045] drivers/coda/coda_pci.c:228: warning: Function parameter or member 'p' not described in 'virtcca_pci_get_rom_size'
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 961f596cd0017f5f254fb4b0ab9f5b9975177b84 commit: 67773feaf933058b9e64a9089345b3c64f823acd [2045/2045] VirtCCA: cvm support UEFI boot config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250320/202503200858.XSvAPfQM-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503200858.XSvAPfQM-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503200858.XSvAPfQM-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/coda/coda_pci.c:36: warning: expecting prototype for virtcca_pci_write_msi_msg(). Prototype was for virtcca_pci_write_msg_msi() instead >> drivers/coda/coda_pci.c:228: warning: Function parameter or member 'p' not described in 'virtcca_pci_get_rom_size' >> drivers/coda/coda_pci.c:228: warning: Excess function parameter 'pdev' description in 'virtcca_pci_get_rom_size' vim +228 drivers/coda/coda_pci.c 28 29 /** 30 * virtcca_pci_write_msi_msg - secure dev write msi msg 31 * @desc: MSI-X description 32 * @msg: Msg information 33 * 34 **/ 35 bool virtcca_pci_write_msg_msi(struct msi_desc *desc, struct msi_msg *msg) > 36 { 37 if (!is_virtcca_cvm_enable()) 38 return false; 39 40 void __iomem *base = pci_msix_desc_addr(desc); 41 u32 ctrl = desc->pci.msix_ctrl; 42 bool unmasked = !(ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT); 43 u64 pbase = mmio_va_to_pa(base); 44 struct pci_dev *pdev = (desc->dev != NULL && 45 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 46 47 if (!is_cc_dev(pci_dev_id(pdev))) 48 return false; 49 50 u64 addr = (u64)msg->address_lo | ((u64)msg->address_hi << 32); 51 52 if (addr) { 53 /* Get the offset of the its register of a specific device */ 54 u64 offset = addr - CVM_MSI_ORIG_IOVA; 55 56 addr = get_g_cc_dev_msi_addr(pci_dev_id(pdev)); 57 addr += offset; 58 if (!addr) 59 return true; 60 } 61 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_LOWER_ADDR, 62 lower_32_bits(addr), CVM_RW_32_BIT, pci_dev_id(pdev)); 63 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_UPPER_ADDR, 64 upper_32_bits(addr), CVM_RW_32_BIT, pci_dev_id(pdev)); 65 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_DATA, 66 msg->data, CVM_RW_32_BIT, pci_dev_id(pdev)); 67 68 if (unmasked) 69 pci_msix_write_vector_ctrl(desc, ctrl); 70 tmi_mmio_read(pbase + PCI_MSIX_ENTRY_DATA, 71 CVM_RW_32_BIT, pci_dev_id(pdev)); 72 73 return true; 74 } 75 76 void virtcca_msix_prepare_msi_desc(struct pci_dev *dev, 77 struct msi_desc *desc, void __iomem *addr) 78 { 79 desc->pci.msix_ctrl = tmi_mmio_read(mmio_va_to_pa(addr + PCI_MSIX_ENTRY_VECTOR_CTRL), 80 CVM_RW_32_BIT, pci_dev_id(dev)); 81 } 82 83 /* 84 * If it is a safety device, write vector ctrl need 85 * use tmi interface 86 */ 87 bool virtcca_pci_msix_write_vector_ctrl(struct msi_desc *desc, u32 ctrl) 88 { 89 if (!is_virtcca_cvm_enable()) 90 return false; 91 92 void __iomem *desc_addr = pci_msix_desc_addr(desc); 93 struct pci_dev *pdev = (desc->dev != NULL && 94 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 95 96 if (pdev == NULL || !is_cc_dev(pci_dev_id(pdev))) 97 return false; 98 99 if (desc->pci.msi_attrib.can_mask) 100 tmi_mmio_write(mmio_va_to_pa(desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL), 101 ctrl, CVM_RW_32_BIT, pci_dev_id(pdev)); 102 return true; 103 } 104 105 /* 106 * If it is a safety device, read msix need 107 * use tmi interface 108 */ 109 bool virtcca_pci_msix_mask(struct msi_desc *desc) 110 { 111 if (!is_virtcca_cvm_enable()) 112 return false; 113 114 struct pci_dev *pdev = (desc->dev != NULL && 115 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 116 117 if (pdev == NULL || !is_cc_dev(pci_dev_id(pdev))) 118 return false; 119 120 /* Flush write to device */ 121 tmi_mmio_read(mmio_va_to_pa(desc->pci.mask_base), CVM_RW_32_BIT, pci_dev_id(pdev)); 122 return true; 123 } 124 125 /** 126 * virtcca_msix_mask_all_cc - mask all secure dev msix c 127 * @dev: Pointer to the pci_dev data structure of MSI-X device function 128 * @base: Io address 129 * @tsize: Number of entry 130 * @dev_num: Dev number 131 * 132 * Returns: 133 * %0 if msix mask all cc device success 134 **/ 135 int virtcca_msix_mask_all_cc(struct pci_dev *dev, void __iomem *base, int tsize, u64 dev_num) 136 { 137 int i; 138 u16 rw_ctrl; 139 u32 ctrl = PCI_MSIX_ENTRY_CTRL_MASKBIT; 140 u64 pbase = mmio_va_to_pa(base); 141 142 if (pci_msi_ignore_mask) 143 goto out; 144 145 for (i = 0; i < tsize; i++, base += PCI_MSIX_ENTRY_SIZE) { 146 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_VECTOR_CTRL, 147 ctrl, CVM_RW_32_BIT, dev_num); 148 } 149 150 out: 151 pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &rw_ctrl); 152 rw_ctrl &= ~PCI_MSIX_FLAGS_MASKALL; 153 rw_ctrl |= 0; 154 pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, rw_ctrl); 155 156 pcibios_free_irq(dev); 157 return 0; 158 } 159 160 /* If device is secure dev, read config need transfer to tmm module */ 161 int virtcca_pci_generic_config_read(void __iomem *addr, unsigned char bus_num, 162 unsigned int devfn, int size, u32 *val) 163 { 164 u32 cvm_bit = size == 1 ? CVM_RW_8_BIT : size == 2 ? CVM_RW_16_BIT : CVM_RW_32_BIT; 165 166 *val = tmi_mmio_read(mmio_va_to_pa(addr), cvm_bit, PCI_DEVID(bus_num, devfn)); 167 return 0; 168 } 169 170 /* If device is secure dev, write config need transfer to tmm module */ 171 int virtcca_pci_generic_config_write(void __iomem *addr, unsigned char bus_num, 172 unsigned int devfn, int size, u32 val) 173 { 174 u32 cvm_bit = size == 1 ? CVM_RW_8_BIT : size == 2 ? CVM_RW_16_BIT : CVM_RW_32_BIT; 175 176 tmi_mmio_write(mmio_va_to_pa(addr), val, cvm_bit, PCI_DEVID(bus_num, devfn)); 177 return 0; 178 } 179 180 /* Judge startup virtcca_cvm_host is enable and device is secure or not */ 181 bool is_virtcca_pci_io_rw(struct vfio_pci_core_device *vdev) 182 { 183 if (!is_virtcca_cvm_enable()) 184 return false; 185 186 struct pci_dev *pdev = vdev->pdev; 187 bool cc_dev = pdev == NULL ? false : is_cc_dev(pci_dev_id(pdev)); 188 189 if (cc_dev) 190 return true; 191 192 return false; 193 } 194 EXPORT_SYMBOL_GPL(is_virtcca_pci_io_rw); 195 196 /* Transfer to tmm write io value */ 197 void virtcca_pci_io_write(struct vfio_pci_core_device *vdev, u64 val, 198 u64 size, void __iomem *io) 199 { 200 struct pci_dev *pdev = vdev->pdev; 201 202 WARN_ON(tmi_mmio_write(mmio_va_to_pa(io), val, size, pci_dev_id(pdev))); 203 } 204 EXPORT_SYMBOL_GPL(virtcca_pci_io_write); 205 206 /* Transfer to tmm read io value */ 207 u64 virtcca_pci_io_read(struct vfio_pci_core_device *vdev, 208 u64 size, void __iomem *io) 209 { 210 struct pci_dev *pdev = vdev->pdev; 211 212 return tmi_mmio_read(mmio_va_to_pa(io), size, pci_dev_id(pdev)); 213 } 214 EXPORT_SYMBOL_GPL(virtcca_pci_io_read); 215 216 /** 217 * virtcca_pci_get_rom_size - obtain the actual size of the ROM image 218 * @pdev: target PCI device 219 * @rom: kernel virtual pointer to image of ROM 220 * @size: size of PCI window 221 * return: size of actual ROM image 222 * 223 * Determine the actual length of the ROM image. 224 * The PCI window size could be much larger than the 225 * actual image size. 226 */ 227 size_t virtcca_pci_get_rom_size(void *p, void __iomem *rom, size_t size) > 228 { -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
by Guo Mengqi 19 Mar '25

19 Mar '25
From: James Smart <jsmart2021(a)gmail.com> mainline inclusion from mainline-v5.19-rc1 commit 577a942df3de2666f6947bdd3a5c9e8d30073424 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6SH CVE: CVE-2022-49535 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- [ Upstream commit 577a942df3de2666f6947bdd3a5c9e8d30073424 ] If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work pending, the node may be released prematurely. When dev-loss-evt completes, the released node is referenced causing a use-after-free null pointer dereference. Similarly, when processing non-zero ELS PLOGI completion status in lpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport registration before triggering node removal. If dev-loss-evt work is pending, the node may be released prematurely and a subsequent call to lpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference. Add test for pending dev-loss before decrementing the node reference count for FLOGI, PLOGI, PRLI, and ADISC handling. Link: https://lore.kernel.org/r/20220412222008.126521-9-jsmart2021@gmail.com Co-developed-by: Justin Tee <justin.tee(a)broadcom.com> Signed-off-by: Justin Tee <justin.tee(a)broadcom.com> Signed-off-by: James Smart <jsmart2021(a)gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Conflicts: drivers/scsi/lpfc/lpfc_els.c [Some contexts are not in this version] Signed-off-by: Guo Mengqi <guomengqi3(a)huawei.com> --- drivers/scsi/lpfc/lpfc_els.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index a6eae7c31bf3..fa1936ed3915 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1408,10 +1408,12 @@ lpfc_initial_flogi(struct lpfc_vport *vport) } if (lpfc_issue_els_flogi(vport, ndlp, 0)) { - /* This decrement of reference count to node shall kick off - * the release of the node. + /* A node reference should be retained while registered with a + * transport or dev-loss-evt work is pending. + * Otherwise, decrement node reference to trigger release. */ - lpfc_nlp_put(ndlp); + if (!(ndlp->nlp_flag & NLP_IN_DEV_LOSS)) + lpfc_nlp_put(ndlp); return 0; } return 1; @@ -1455,10 +1457,12 @@ lpfc_initial_fdisc(struct lpfc_vport *vport) } if (lpfc_issue_els_fdisc(vport, ndlp, 0)) { - /* decrement node reference count to trigger the release of - * the node. + /* A node reference should be retained while registered with a + * transport or dev-loss-evt work is pending. + * Otherwise, decrement node reference to trigger release. */ - lpfc_nlp_put(ndlp); + if (!(ndlp->nlp_flag & NLP_IN_DEV_LOSS)) + lpfc_nlp_put(ndlp); return 0; } return 1; -- 2.22.0
2 1
0 0
[openEuler-1.0-LTS] scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
by Guo Mengqi 19 Mar '25

19 Mar '25
From: James Smart <jsmart2021(a)gmail.com> mainline inclusion from mainline-v5.19-rc1 commit 577a942df3de2666f6947bdd3a5c9e8d30073424 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6SH CVE: CVE-2022-49535 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- [ Upstream commit 577a942df3de2666f6947bdd3a5c9e8d30073424 ] If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work pending, the node may be released prematurely. When dev-loss-evt completes, the released node is referenced causing a use-after-free null pointer dereference. Similarly, when processing non-zero ELS PLOGI completion status in lpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport registration before triggering node removal. If dev-loss-evt work is pending, the node may be released prematurely and a subsequent call to lpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference. Add test for pending dev-loss before decrementing the node reference count for FLOGI, PLOGI, PRLI, and ADISC handling. Link: https://lore.kernel.org/r/20220412222008.126521-9-jsmart2021@gmail.com Co-developed-by: Justin Tee <justin.tee(a)broadcom.com> Signed-off-by: Justin Tee <justin.tee(a)broadcom.com> Signed-off-by: James Smart <jsmart2021(a)gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Conflicts: drivers/scsi/lpfc/lpfc_els.c [Some contexts are not in this version] Signed-off-by: Guo Mengqi <guomengqi3(a)huawei.com> --- drivers/scsi/lpfc/lpfc_els.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index a6eae7c31bf3..fa1936ed3915 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1408,10 +1408,12 @@ lpfc_initial_flogi(struct lpfc_vport *vport) } if (lpfc_issue_els_flogi(vport, ndlp, 0)) { - /* This decrement of reference count to node shall kick off - * the release of the node. + /* A node reference should be retained while registered with a + * transport or dev-loss-evt work is pending. + * Otherwise, decrement node reference to trigger release. */ - lpfc_nlp_put(ndlp); + if (!(ndlp->nlp_flag & NLP_IN_DEV_LOSS)) + lpfc_nlp_put(ndlp); return 0; } return 1; @@ -1455,10 +1457,12 @@ lpfc_initial_fdisc(struct lpfc_vport *vport) } if (lpfc_issue_els_fdisc(vport, ndlp, 0)) { - /* decrement node reference count to trigger the release of - * the node. + /* A node reference should be retained while registered with a + * transport or dev-loss-evt work is pending. + * Otherwise, decrement node reference to trigger release. */ - lpfc_nlp_put(ndlp); + if (!(ndlp->nlp_flag & NLP_IN_DEV_LOSS)) + lpfc_nlp_put(ndlp); return 0; } return 1; -- 2.22.0
1 0
0 0
[openeuler:openEuler-1.0-LTS 1504/1504] drivers/tee/optee/core.c:618:10: warning: return makes integer from pointer without a cast
by kernel test robot 19 Mar '25

19 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5624ca70f4eb787c54115bc1e1eb09ea582fd9a4 commit: 595311cf7e49c781dd26782e4b45fd54bbfb3e40 [1504/1504] optee: model OP-TEE as a platform device/driver config: arm64-randconfig-002-20250319 (https://download.01.org/0day-ci/archive/20250319/202503191516.fZeE5He3-lkp@…) compiler: aarch64-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503191516.fZeE5He3-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503191516.fZeE5He3-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/tee/optee/core.c: In function 'optee_probe': >> drivers/tee/optee/core.c:618:10: warning: return makes integer from pointer without a cast [-Wint-conversion] return ERR_PTR(-EINVAL); ^~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for UACCE Depends on [n]: IOMMU_API [=n] Selected by [m]: - CRYPTO_DEV_HISI_QM [=m] && CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 [=y] && PCI [=y] vim +618 drivers/tee/optee/core.c 595311cf7e49c7 Ard Biesheuvel 2019-12-09 581 595311cf7e49c7 Ard Biesheuvel 2019-12-09 582 static int optee_probe(struct platform_device *pdev) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 583 { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 584 optee_invoke_fn *invoke_fn; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 585 struct tee_shm_pool *pool; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 586 struct optee *optee = NULL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 587 void *memremaped_shm = NULL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 588 struct tee_device *teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 589 u32 sec_caps; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 590 int rc; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 591 595311cf7e49c7 Ard Biesheuvel 2019-12-09 592 invoke_fn = get_invoke_func(&pdev->dev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 593 if (IS_ERR(invoke_fn)) 595311cf7e49c7 Ard Biesheuvel 2019-12-09 594 return PTR_ERR(invoke_fn); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 595 4fb0a5eb364d23 Jens Wiklander 2015-04-14 596 if (!optee_msg_api_uid_is_optee_api(invoke_fn)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 597 pr_warn("api uid mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 598 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 599 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 600 5c5f80307ab27c Jérôme Forissier 2017-11-24 601 optee_msg_get_os_revision(invoke_fn); 5c5f80307ab27c Jérôme Forissier 2017-11-24 602 4fb0a5eb364d23 Jens Wiklander 2015-04-14 603 if (!optee_msg_api_revision_is_compatible(invoke_fn)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 604 pr_warn("api revision mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 605 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 606 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 607 4fb0a5eb364d23 Jens Wiklander 2015-04-14 608 if (!optee_msg_exchange_capabilities(invoke_fn, &sec_caps)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 609 pr_warn("capabilities mismatch\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 610 return -EINVAL; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 611 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 612 4fb0a5eb364d23 Jens Wiklander 2015-04-14 613 /* 4fb0a5eb364d23 Jens Wiklander 2015-04-14 614 * We have no other option for shared memory, if secure world 4fb0a5eb364d23 Jens Wiklander 2015-04-14 615 * doesn't have any reserved memory we can use we can't continue. 4fb0a5eb364d23 Jens Wiklander 2015-04-14 616 */ 4fb0a5eb364d23 Jens Wiklander 2015-04-14 617 if (!(sec_caps & OPTEE_SMC_SEC_CAP_HAVE_RESERVED_SHM)) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 @618 return ERR_PTR(-EINVAL); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 619 f58e236c9d665a Volodymyr Babchuk 2017-11-29 620 pool = optee_config_shm_memremap(invoke_fn, &memremaped_shm, sec_caps); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 621 if (IS_ERR(pool)) 595311cf7e49c7 Ard Biesheuvel 2019-12-09 622 return PTR_ERR(pool); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 623 4fb0a5eb364d23 Jens Wiklander 2015-04-14 624 optee = kzalloc(sizeof(*optee), GFP_KERNEL); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 625 if (!optee) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 626 rc = -ENOMEM; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 627 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 628 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 629 4fb0a5eb364d23 Jens Wiklander 2015-04-14 630 optee->invoke_fn = invoke_fn; d885cc5e0759fc Volodymyr Babchuk 2017-11-29 631 optee->sec_caps = sec_caps; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 632 4fb0a5eb364d23 Jens Wiklander 2015-04-14 633 teedev = tee_device_alloc(&optee_desc, NULL, pool, optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 634 if (IS_ERR(teedev)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 635 rc = PTR_ERR(teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 636 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 637 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 638 optee->teedev = teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 639 4fb0a5eb364d23 Jens Wiklander 2015-04-14 640 teedev = tee_device_alloc(&optee_supp_desc, NULL, pool, optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 641 if (IS_ERR(teedev)) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 642 rc = PTR_ERR(teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 643 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 644 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 645 optee->supp_teedev = teedev; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 646 4fb0a5eb364d23 Jens Wiklander 2015-04-14 647 rc = tee_device_register(optee->teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 648 if (rc) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 649 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 650 4fb0a5eb364d23 Jens Wiklander 2015-04-14 651 rc = tee_device_register(optee->supp_teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 652 if (rc) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 653 goto err; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 654 4fb0a5eb364d23 Jens Wiklander 2015-04-14 655 mutex_init(&optee->call_queue.mutex); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 656 INIT_LIST_HEAD(&optee->call_queue.waiters); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 657 optee_wait_queue_init(&optee->wait_queue); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 658 optee_supp_init(&optee->supp); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 659 optee->memremaped_shm = memremaped_shm; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 660 optee->pool = pool; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 661 4fb0a5eb364d23 Jens Wiklander 2015-04-14 662 optee_enable_shm_cache(optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 663 595311cf7e49c7 Ard Biesheuvel 2019-12-09 664 platform_set_drvdata(pdev, optee); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 665 4fb0a5eb364d23 Jens Wiklander 2015-04-14 666 pr_info("initialized driver\n"); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 667 return 0; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 668 err: 4fb0a5eb364d23 Jens Wiklander 2015-04-14 669 if (optee) { 4fb0a5eb364d23 Jens Wiklander 2015-04-14 670 /* 4fb0a5eb364d23 Jens Wiklander 2015-04-14 671 * tee_device_unregister() is safe to call even if the 4fb0a5eb364d23 Jens Wiklander 2015-04-14 672 * devices hasn't been registered with 4fb0a5eb364d23 Jens Wiklander 2015-04-14 673 * tee_device_register() yet. 4fb0a5eb364d23 Jens Wiklander 2015-04-14 674 */ 4fb0a5eb364d23 Jens Wiklander 2015-04-14 675 tee_device_unregister(optee->supp_teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 676 tee_device_unregister(optee->teedev); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 677 kfree(optee); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 678 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 679 if (pool) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 680 tee_shm_pool_free(pool); 4fb0a5eb364d23 Jens Wiklander 2015-04-14 681 if (memremaped_shm) 4fb0a5eb364d23 Jens Wiklander 2015-04-14 682 memunmap(memremaped_shm); 595311cf7e49c7 Ard Biesheuvel 2019-12-09 683 return rc; 4fb0a5eb364d23 Jens Wiklander 2015-04-14 684 } 4fb0a5eb364d23 Jens Wiklander 2015-04-14 685 :::::: The code at line 618 was first introduced by commit :::::: 4fb0a5eb364d239722e745c02aef0dbd4e0f1ad2 tee: add OP-TEE driver :::::: TO: Jens Wiklander <jens.wiklander(a)linaro.org> :::::: CC: Jens Wiklander <jens.wiklander(a)linaro.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 1/2] bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic
by Pu Lehui 19 Mar '25

19 Mar '25
From: Andrii Nakryiko <andrii(a)kernel.org> stable inclusion from stable-v6.6.80 commit fc01ba097319ae2033f118da3075bd783f4a08e9 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSW0M CVE: CVE-2025-21853 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 98671a0fd1f14e4a518ee06b19037c20014900eb ] For all BPF maps we ensure that VM_MAYWRITE is cleared when memory-mapping BPF map contents as initially read-only VMA. This is because in some cases BPF verifier relies on the underlying data to not be modified afterwards by user space, so once something is mapped read-only, it shouldn't be re-mmap'ed as read-write. As such, it's not necessary to check VM_MAYWRITE in bpf_map_mmap() and map->ops->map_mmap() callbacks: VM_WRITE should be consistently set for read-write mappings, and if VM_WRITE is not set, there is no way for user space to upgrade read-only mapping to read-write one. This patch cleans up this VM_WRITE vs VM_MAYWRITE handling within bpf_map_mmap(), which is an entry point for any BPF map mmap()-ing logic. We also drop unnecessary sanitization of VM_MAYWRITE in BPF ringbuf's map_mmap() callback implementation, as it is already performed by common code in bpf_map_mmap(). Note, though, that in bpf_map_mmap_{open,close}() callbacks we can't drop VM_MAYWRITE use, because it's possible (and is outside of subsystem's control) to have initially read-write memory mapping, which is subsequently dropped to read-only by user space through mprotect(). In such case, from BPF verifier POV it's read-write data throughout the lifetime of BPF map, and is counted as "active writer". But its VMAs will start out as VM_WRITE|VM_MAYWRITE, then mprotect() can change it to just VM_MAYWRITE (and no VM_WRITE), so when its finally munmap()'ed and bpf_map_mmap_close() is called, vm_flags will be just VM_MAYWRITE, but we still need to decrement active writer count with bpf_map_write_active_dec() as it's still considered to be a read-write mapping by the rest of BPF subsystem. Similar reasoning applies to bpf_map_mmap_open(), which is called whenever mmap(), munmap(), and/or mprotect() forces mm subsystem to split original VMA into multiple discontiguous VMAs. Memory-mapping handling is a bit tricky, yes. Cc: Jann Horn <jannh(a)google.com> Cc: Suren Baghdasaryan <surenb(a)google.com> Cc: Shakeel Butt <shakeel.butt(a)linux.dev> Signed-off-by: Andrii Nakryiko <andrii(a)kernel.org> Link: https://lore.kernel.org/r/20250129012246.1515826-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast(a)kernel.org> Stable-dep-of: bc27c52eea18 ("bpf: avoid holding freeze_mutex during mmap operation") Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Pu Lehui <pulehui(a)huawei.com> --- kernel/bpf/ringbuf.c | 4 ---- kernel/bpf/syscall.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c index 00688545742f..6aff5ee483b6 100644 --- a/kernel/bpf/ringbuf.c +++ b/kernel/bpf/ringbuf.c @@ -268,8 +268,6 @@ static int ringbuf_map_mmap_kern(struct bpf_map *map, struct vm_area_struct *vma /* allow writable mapping for the consumer_pos only */ if (vma->vm_pgoff != 0 || vma->vm_end - vma->vm_start != PAGE_SIZE) return -EPERM; - } else { - vm_flags_clear(vma, VM_MAYWRITE); } /* remap_vmalloc_range() checks size and offset constraints */ return remap_vmalloc_range(vma, rb_map->rb, @@ -289,8 +287,6 @@ static int ringbuf_map_mmap_user(struct bpf_map *map, struct vm_area_struct *vma * position, and the ring buffer data itself. */ return -EPERM; - } else { - vm_flags_clear(vma, VM_MAYWRITE); } /* remap_vmalloc_range() checks size and offset constraints */ return remap_vmalloc_range(vma, rb_map->rb, vma->vm_pgoff + RINGBUF_PGOFF); diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index f8edda3bf396..f79b8915d8c8 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -913,15 +913,21 @@ static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &bpf_map_default_vmops; vma->vm_private_data = map; vm_flags_clear(vma, VM_MAYEXEC); + /* If mapping is read-only, then disallow potentially re-mapping with + * PROT_WRITE by dropping VM_MAYWRITE flag. This VM_MAYWRITE clearing + * means that as far as BPF map's memory-mapped VMAs are concerned, + * VM_WRITE and VM_MAYWRITE and equivalent, if one of them is set, + * both should be set, so we can forget about VM_MAYWRITE and always + * check just VM_WRITE + */ if (!(vma->vm_flags & VM_WRITE)) - /* disallow re-mapping with PROT_WRITE */ vm_flags_clear(vma, VM_MAYWRITE); err = map->ops->map_mmap(map, vma); if (err) goto out; - if (vma->vm_flags & VM_MAYWRITE) + if (vma->vm_flags & VM_WRITE) bpf_map_write_active_inc(map); out: mutex_unlock(&map->freeze_mutex); -- 2.34.1
2 2
0 0
[PATCH openEuler-1.0-LTS] block: fix error unwinding in blk_register_queue
by Zheng Qixing 19 Mar '25

19 Mar '25
From: Christoph Hellwig <hch(a)lst.de> mainline inclusion from mainline-v6.2-rc1 commit 40602997be26887bdfa3d58659c3acb4579099e9 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSG04 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… ------------------ blk_register_queue fails to handle errors from blk_mq_sysfs_register, leaks various resources on errors and accidentally sets queue refs percpu refcount to percpu mode on kobject_add failure. Fix all that by properly unwinding on errors. Signed-off-by: Christoph Hellwig <hch(a)lst.de> Link: https://lore.kernel.org/r/20221114042637.1009333-4-hch@lst.de Signed-off-by: Jens Axboe <axboe(a)kernel.dk> Conflicts: block/blk-sysfs.c [Context conflicts.] Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- block/blk-sysfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b23d82fbe736..05d8a5b236f5 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -961,15 +961,21 @@ int blk_register_queue(struct gendisk *disk) return ret; mutex_lock(&queue_to_wrapper(q)->sysfs_dir_lock); - ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue"); if (ret < 0) { blk_trace_remove_sysfs(dev); goto unlock; } - if (q->mq_ops) - __blk_mq_register_dev(dev, q); + if (q->mq_ops) { + ret = __blk_mq_register_dev(dev, q); + if (ret) { + blk_trace_remove_sysfs(dev); + kobject_del(&q->kobj); + kobject_put(&dev->kobj); + goto unlock; + } + } mutex_lock(&q->sysfs_lock); mutex_lock(&q->debugfs_mutex); -- 2.39.2
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • ...
  • 50
  • Older →

HyperKitty Powered by HyperKitty