Message ID | 1513711816-2618-42-git-send-email-dongwon.kim@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c b/drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c index f59dee3..cccdc19 100644 --- a/drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c +++ b/drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c @@ -120,10 +120,11 @@ hyper_dmabuf_id_t hyper_dmabuf_get_hid(void) */ if (hid.id == -1 && count < HYPER_DMABUF_ID_MAX) { hid.id = HYPER_DMABUF_ID_CREATE(hyper_dmabuf_private.domid, count++); - /* random data embedded in the id for security */ - get_random_bytes(&hid.rng_key[0], 12); } + /* random data embedded in the id for security */ + get_random_bytes(&hid.rng_key[0], 12); + return hid; }