* [linux-next:master 9912/10599] kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer
@ 2025-11-20 21:35 kernel test robot
2025-11-20 22:06 ` Pasha Tatashin
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-11-20 21:35 UTC (permalink / raw)
To: Pasha Tatashin; +Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b
commit: f485f57c35af5b8c2a243dfc39ee171673484915 [9912/10599] liveupdate: luo_session: add sessions support
config: x86_64-randconfig-121-20251120 (https://download.01.org/0day-ci/archive/20251121/202511210513.ywQeN1k6-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251121/202511210513.ywQeN1k6-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/202511210513.ywQeN1k6-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer
vim +392 kernel/liveupdate/luo_session.c
357
358 int luo_session_deserialize(void)
359 {
360 struct luo_session_header *sh = &luo_session_global.incoming;
361 int err;
362
363 if (luo_session_is_deserialized())
364 return 0;
365
366 luo_session_global.deserialized = true;
367 if (!sh->active) {
368 INIT_LIST_HEAD(&sh->list);
369 init_rwsem(&sh->rwsem);
370 return 0;
371 }
372
373 for (int i = 0; i < sh->header_ser->count; i++) {
374 struct luo_session *session;
375
376 session = luo_session_alloc(sh->ser[i].name);
377 if (IS_ERR(session)) {
378 pr_warn("Failed to allocate session [%s] during deserialization %pe\n",
379 sh->ser[i].name, session);
380 return PTR_ERR(session);
381 }
382
383 err = luo_session_insert(sh, session);
384 if (err) {
385 luo_session_free(session);
386 pr_warn("Failed to insert session [%s] %pe\n",
387 session->name, ERR_PTR(err));
388 return err;
389 }
390
391 session->count = sh->ser[i].count;
> 392 session->files = sh->ser[i].files ? phys_to_virt(sh->ser[i].files) : 0;
393 session->pgcnt = sh->ser[i].pgcnt;
394 }
395
396 kho_restore_free(sh->header_ser);
397 sh->header_ser = NULL;
398 sh->ser = NULL;
399
400 return 0;
401 }
402
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 9912/10599] kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer
2025-11-20 21:35 [linux-next:master 9912/10599] kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer kernel test robot
@ 2025-11-20 22:06 ` Pasha Tatashin
0 siblings, 0 replies; 2+ messages in thread
From: Pasha Tatashin @ 2025-11-20 22:06 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
On Thu, Nov 20, 2025 at 4:36 PM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b
> commit: f485f57c35af5b8c2a243dfc39ee171673484915 [9912/10599] liveupdate: luo_session: add sessions support
> config: x86_64-randconfig-121-20251120 (https://download.01.org/0day-ci/archive/20251121/202511210513.ywQeN1k6-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251121/202511210513.ywQeN1k6-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/202511210513.ywQeN1k6-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer
>
> vim +392 kernel/liveupdate/luo_session.c
>
> 357
> 358 int luo_session_deserialize(void)
> 359 {
> 360 struct luo_session_header *sh = &luo_session_global.incoming;
> 361 int err;
> 362
> 363 if (luo_session_is_deserialized())
> 364 return 0;
> 365
> 366 luo_session_global.deserialized = true;
> 367 if (!sh->active) {
> 368 INIT_LIST_HEAD(&sh->list);
> 369 init_rwsem(&sh->rwsem);
> 370 return 0;
> 371 }
> 372
> 373 for (int i = 0; i < sh->header_ser->count; i++) {
> 374 struct luo_session *session;
> 375
> 376 session = luo_session_alloc(sh->ser[i].name);
> 377 if (IS_ERR(session)) {
> 378 pr_warn("Failed to allocate session [%s] during deserialization %pe\n",
> 379 sh->ser[i].name, session);
> 380 return PTR_ERR(session);
> 381 }
> 382
> 383 err = luo_session_insert(sh, session);
> 384 if (err) {
> 385 luo_session_free(session);
> 386 pr_warn("Failed to insert session [%s] %pe\n",
> 387 session->name, ERR_PTR(err));
> 388 return err;
> 389 }
> 390
> 391 session->count = sh->ser[i].count;
> > 392 session->files = sh->ser[i].files ? phys_to_virt(sh->ser[i].files) : 0;
Should be: session->files = sh->ser[i].files ?
phys_to_virt(sh->ser[i].files) : NULL;
Will fix it in the next version.
Pasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-20 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-20 21:35 [linux-next:master 9912/10599] kernel/liveupdate/luo_session.c:392:86: sparse: sparse: Using plain integer as NULL pointer kernel test robot
2025-11-20 22:06 ` Pasha Tatashin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox