Re: [PATCH net-next v7 2/6] can: add CAN skb extension infrastructure
From: kernel test robot <hidden>
Date: 2026-01-31 21:02:33
Also in:
linux-can, lkml, oe-kbuild-all
Hi Oliver, kernel test robot noticed the following build warnings: [auto build test WARNING on 239f09e258b906deced5c2a7c1ac8aed301b558b] url: https://github.com/intel-lab-lkp/linux/commits/Oliver-Hartkopp-via-B4-Relay/can-use-skb-hash-instead-of-private-variable-in-headroom/20260131-212921 base: 239f09e258b906deced5c2a7c1ac8aed301b558b patch link: https://lore.kernel.org/r/20260131-can_skb_ext-v7-2-dd0f8f84a83d%40hartkopp.net patch subject: [PATCH net-next v7 2/6] can: add CAN skb extension infrastructure config: s390-randconfig-r072-20260201 (https://download.01.org/0day-ci/archive/20260201/202602010426.PnGrYAk3-lkp@intel.com/config) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710) smatch version: v0.5.0-8994-gd50c5a4c 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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202602010426.PnGrYAk3-lkp@intel.com/ (local) smatch warnings: net/can/j1939/transport.c:1073 j1939_simple_txnext() warn: inconsistent indenting vim +1073 net/can/j1939/transport.c 9d71dd0c700999 The j1939 authors 2018-10-08 1045 9d71dd0c700999 The j1939 authors 2018-10-08 1046 static int j1939_simple_txnext(struct j1939_session *session) 9d71dd0c700999 The j1939 authors 2018-10-08 1047 { 9d71dd0c700999 The j1939 authors 2018-10-08 1048 struct j1939_priv *priv = session->priv; 2030043e616cab Oleksij Rempel 2021-05-21 1049 struct sk_buff *se_skb = j1939_session_skb_get(session); 9d71dd0c700999 The j1939 authors 2018-10-08 1050 struct sk_buff *skb; 9d71dd0c700999 The j1939 authors 2018-10-08 1051 int ret; 9d71dd0c700999 The j1939 authors 2018-10-08 1052 9d71dd0c700999 The j1939 authors 2018-10-08 1053 if (!se_skb) 9d71dd0c700999 The j1939 authors 2018-10-08 1054 return 0; 9d71dd0c700999 The j1939 authors 2018-10-08 1055 9d71dd0c700999 The j1939 authors 2018-10-08 1056 skb = skb_clone(se_skb, GFP_ATOMIC); 2030043e616cab Oleksij Rempel 2021-05-21 1057 if (!skb) { 2030043e616cab Oleksij Rempel 2021-05-21 1058 ret = -ENOMEM; 2030043e616cab Oleksij Rempel 2021-05-21 1059 goto out_free; 2030043e616cab Oleksij Rempel 2021-05-21 1060 } 9d71dd0c700999 The j1939 authors 2018-10-08 1061 f170b16e1461f2 Oliver Hartkopp 2026-01-31 1062 /* the cloned skb points to the skb extension of the original se_skb f170b16e1461f2 Oliver Hartkopp 2026-01-31 1063 * with an increased refcount. skb_ext_add() creates a copy to f170b16e1461f2 Oliver Hartkopp 2026-01-31 1064 * separate the skb extension data which is needed to modify the f170b16e1461f2 Oliver Hartkopp 2026-01-31 1065 * can_framelen in can_put_echo_skb(). f170b16e1461f2 Oliver Hartkopp 2026-01-31 1066 */ f170b16e1461f2 Oliver Hartkopp 2026-01-31 1067 if (!skb_ext_add(skb, SKB_EXT_CAN)) { f170b16e1461f2 Oliver Hartkopp 2026-01-31 1068 kfree_skb(skb); f170b16e1461f2 Oliver Hartkopp 2026-01-31 1069 ret = -ENOMEM; f170b16e1461f2 Oliver Hartkopp 2026-01-31 1070 goto out_free; f170b16e1461f2 Oliver Hartkopp 2026-01-31 1071 } f170b16e1461f2 Oliver Hartkopp 2026-01-31 1072 9d71dd0c700999 The j1939 authors 2018-10-08 @1073 can_skb_set_owner(skb, se_skb->sk); 9d71dd0c700999 The j1939 authors 2018-10-08 1074 9d71dd0c700999 The j1939 authors 2018-10-08 1075 j1939_tp_set_rxtimeout(session, J1939_SIMPLE_ECHO_TIMEOUT_MS); 9d71dd0c700999 The j1939 authors 2018-10-08 1076 9d71dd0c700999 The j1939 authors 2018-10-08 1077 ret = j1939_send_one(priv, skb); 9d71dd0c700999 The j1939 authors 2018-10-08 1078 if (ret) 2030043e616cab Oleksij Rempel 2021-05-21 1079 goto out_free; 9d71dd0c700999 The j1939 authors 2018-10-08 1080 cd85d3aed5cf44 Oleksij Rempel 2021-07-07 1081 j1939_sk_errqueue(session, J1939_ERRQUEUE_TX_SCHED); 9d71dd0c700999 The j1939 authors 2018-10-08 1082 j1939_sk_queue_activate_next(session); 9d71dd0c700999 The j1939 authors 2018-10-08 1083 2030043e616cab Oleksij Rempel 2021-05-21 1084 out_free: 2030043e616cab Oleksij Rempel 2021-05-21 1085 if (ret) 2030043e616cab Oleksij Rempel 2021-05-21 1086 kfree_skb(se_skb); 2030043e616cab Oleksij Rempel 2021-05-21 1087 else 2030043e616cab Oleksij Rempel 2021-05-21 1088 consume_skb(se_skb); 2030043e616cab Oleksij Rempel 2021-05-21 1089 2030043e616cab Oleksij Rempel 2021-05-21 1090 return ret; 9d71dd0c700999 The j1939 authors 2018-10-08 1091 } 9d71dd0c700999 The j1939 authors 2018-10-08 1092 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki