Skip to content
Commit 4d544e3b authored by Chang Huaixin's avatar Chang Huaixin Committed by Dmitry Torokhov
Browse files

Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend



xenkbd_disconnect_backend doesn't free grant table entry.  This bug affects
live migration.

xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref to handle
grant table entry which doesn't really free an entry.

Thus every time we do xenkbd_resume, grant table entry increses by one. As
an grant table entry occupies 8 bytes, an grant table page has at most 512
entries. Every 512 times we do xenkdb_resume, grant table pages increses by
one.

After around 3500 times of live migration, grant table pages will increase
by 7, causing too many pages to populate and hitting max_pages limit when
assigning pages.Thus assign_pages will fail, so will live migration.

Signed-off-by: default avatarChang Huaixin <huaixin.chx@alibaba-inc.com>
Acked-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent b0cfb794
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment