summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2022-05-06 21:16:24 +0800
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 12:45:09 -0400
commit0756ad15b1fef287d4d8fa11bc36ea77a5c42e4a (patch)
tree5c068d202e0cb8da12cfe2651331d9e54aee5cbf /sound
parent6fd763d155860eb7ea3a93c8b3bf926940ffa3fb (diff)
downloadlinux-stable-0756ad15b1fef287d4d8fa11bc36ea77a5c42e4a.tar.gz
linux-stable-0756ad15b1fef287d4d8fa11bc36ea77a5c42e4a.tar.bz2
linux-stable-0756ad15b1fef287d4d8fa11bc36ea77a5c42e4a.zip
virtio-crypto: use private buffer for control request
Originally, all of the control requests share a single buffer( ctrl & input & ctrl_status fields in struct virtio_crypto), this allows queue depth 1 only, the performance of control queue gets limited by this design. In this patch, each request allocates request buffer dynamically, and free buffer after request, so the scope protected by ctrl_lock also get optimized here. It's possible to optimize control queue depth in the next step. A necessary comment is already in code, still describe it again: /* * Note: there are padding fields in request, clear them to zero before * sending to host to avoid to divulge any information. * Ex, virtio_crypto_ctrl_request::ctrl::u::destroy_session::padding[48] */ So use kzalloc to allocate buffer of struct virtio_crypto_ctrl_request. Potentially dereferencing uninitialized variables: Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20220506131627.180784-3-pizhenwei@bytedance.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions