[bug report] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl

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

 



Hello Rick Edgecombe,

Commit 211f514ebf1e ("Drivers: hv: vmbus: Track decrypted status in
vmbus_gpadl") from Mar 11, 2024 (linux-next), leads to the following
Smatch static checker warning:

	drivers/hv/channel.c:870 vmbus_teardown_gpadl()
	warn: assigning signed to unsigned: 'gpadl->decrypted = ret' 's32min-s32max'

drivers/hv/channel.c
    860         list_del(&info->msglistentry);
    861         spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
    862 
    863         kfree(info);
    864 
    865         ret = set_memory_encrypted((unsigned long)gpadl->buffer,
    866                                    PFN_UP(gpadl->size));
    867         if (ret)
    868                 pr_warn("Fail to set mem host visibility in GPADL teardown %d.\n", ret);
    869 
--> 870         gpadl->decrypted = ret;

ret is error codes but ->decrypted is bool.  So error codes mean decrypted is
true.

    871 
    872         return ret;
    873 }

regards,
dan carpenter




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux