Linux-HyperV List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: linux-hyperv@vger.kernel.org
Subject: [bug report] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl
Date: Sat, 27 Jul 2024 00:33:56 -0500	[thread overview]
Message-ID: <4036aa13-e8e1-413c-b0ad-5b82b3f2615d@stanley.mountain> (raw)

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

             reply	other threads:[~2024-07-27  5:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-27  5:33 Dan Carpenter [this message]
2024-07-29 17:13 ` [bug report] Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl Edgecombe, Rick P
2024-07-29 18:31   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4036aa13-e8e1-413c-b0ad-5b82b3f2615d@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=rick.p.edgecombe@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox