* Re: [PATCH] RDMA/rtrs-clt: Fix double free on path sysfs failure
[not found] <20260714142838.1723076-1-lgs201920130244@gmail.com>
@ 2026-08-20 4:35 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-20 4:35 UTC (permalink / raw)
To: Guangshuo Li, Md. Haris Iqbal, Jack Wang, Jason Gunthorpe,
Leon Romanovsky, Gioh Kim, linux-rdma, linux-kernel
Cc: llvm, oe-kbuild-all, Guangshuo Li
Hi Guangshuo,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rdma/for-next]
[also build test WARNING on linus/master v7.2 next-20260819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Guangshuo-Li/RDMA-rtrs-clt-Fix-double-free-on-path-sysfs-failure/20260815-173725
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
patch link: https://lore.kernel.org/r/20260714142838.1723076-1-lgs201920130244%40gmail.com
patch subject: [PATCH] RDMA/rtrs-clt: Fix double free on path sysfs failure
config: i386-buildonly-randconfig-004-20260820 (https://download.01.org/0day-ci/archive/20260820/202608201231.bfKSlFoO-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/202608201231.bfKSlFoO-lkp@intel.com/reproduce)
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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608201231.bfKSlFoO-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c:470:1: warning: unused label 'del_kobj' [-Wunused-label]
470 | del_kobj:
| ^~~~~~~~~
1 warning generated.
vim +/del_kobj +470 drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c
424
425 int rtrs_clt_create_path_files(struct rtrs_clt_path *clt_path)
426 {
427 struct rtrs_clt_sess *clt = clt_path->clt;
428 char str[NAME_MAX];
429 int err;
430 struct rtrs_addr path = {
431 .src = &clt_path->s.src_addr,
432 .dst = &clt_path->s.dst_addr,
433 };
434
435 rtrs_addr_to_str(&path, str, sizeof(str));
436 err = kobject_init_and_add(&clt_path->kobj, &ktype_sess,
437 clt->kobj_paths,
438 "%s", str);
439 if (err) {
440 pr_err("kobject_init_and_add: %pe\n", ERR_PTR(err));
441 goto free_stats;
442 }
443 err = sysfs_create_group(&clt_path->kobj, &rtrs_clt_path_attr_group);
444 if (err) {
445 pr_err("sysfs_create_group(): %pe\n", ERR_PTR(err));
446 goto del_kobj_free_stats;
447 }
448 err = kobject_init_and_add(&clt_path->stats->kobj_stats, &ktype_stats,
449 &clt_path->kobj, "stats");
450 if (err) {
451 pr_err("kobject_init_and_add: %pe\n", ERR_PTR(err));
452 kobject_put(&clt_path->stats->kobj_stats);
453 goto remove_group;
454 }
455
456 err = sysfs_create_group(&clt_path->stats->kobj_stats,
457 &rtrs_clt_stats_attr_group);
458 if (err) {
459 pr_err("failed to create stats sysfs group, err: %pe\n", ERR_PTR(err));
460 goto put_kobj_stats;
461 }
462
463 return 0;
464
465 put_kobj_stats:
466 kobject_del(&clt_path->stats->kobj_stats);
467 kobject_put(&clt_path->stats->kobj_stats);
468 remove_group:
469 sysfs_remove_group(&clt_path->kobj, &rtrs_clt_path_attr_group);
> 470 del_kobj:
471 kobject_del(&clt_path->kobj);
472 return err;
473
474 del_kobj_free_stats:
475 kobject_del(&clt_path->kobj);
476 free_stats:
477 free_percpu(clt_path->stats->pcpu_stats);
478 kfree(clt_path->stats);
479
480 /*
481 * Leave the path kobject reference to the caller so it can tear
482 * down the connections before rtrs_clt_path_release() frees it.
483 */
484
485 return err;
486 }
487
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-20 4:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260714142838.1723076-1-lgs201920130244@gmail.com>
2026-08-20 4:35 ` [PATCH] RDMA/rtrs-clt: Fix double free on path sysfs failure kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox