re: livepatch: reuse module loader code to write relocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jessica Yu,

This is a semi-automatic email about new static checker warnings.

The patch 425595a7fc20: "livepatch: reuse module loader code to write 
relocations" from Mar 22, 2016, leads to the following Smatch 
complaint:

kernel/livepatch/core.c:888 klp_register_patch()
	 warn: variable dereferenced before check 'patch' (see line 879)

kernel/livepatch/core.c
   878	
   879		if (!is_livepatch_module(patch->mod)) {
                                         ^^^^^^^^^^
   880			pr_err("module %s is not marked as a livepatch module",
   881			       patch->mod->name);
                               ^^^^^^^^^^^^^^^^
Patch adds new dereferences.

   882			return -EINVAL;
   883		}
   884	
   885		if (!klp_initialized())
   886			return -ENODEV;
   887	
   888		if (!patch || !patch->mod)
                     ^^^^^^^^^^^^^^^^^^^^
Old code assumed patch could be NULL.

   889			return -EINVAL;
   890	

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux