[sheepdog] [sheepdog/sheepdog] 564797: sheep: avoid panic in COW when sheep fails to allo...
mitake.hitoshi at lab.ntt.co.jp
Sat Aug 15 08:26:18 CEST 2015
Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Date: 2015-08-15 (Sat, 15 Aug 2015)
sheep: avoid panic in COW when sheep fails to allocate memory
Current code for COW requests can call panic() because it uses
xzalloc() and xcalloc() for processing the requests. This commit lets
the code avoid use the functions and return SD_RES_NO_MEM because COW
is a very common and frequent request. It is better to return error
code to VMs than killing sheep.
Even if the memory allocations fail, it just causes object leaks. This
behavior is not changed from the existing strategy which calls
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
More information about the sheepdog