mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
sk-unix: allocate FdinfoEntry with shmalloc in get_fle_for_task
We already do so in other branch of if in dup_fdinfo, let's then do it symmetrically. We later put pointer to this FdinfoEntry in collect_fd_to int alloc_fle to fdinfo_list_entry->fe so it can be later used from other places and if one thread modifies it we would not see modification in other threads. Do we really need to see these modifications? - It's Mistery, but better be on the safe side. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> (cherry picked from commit 376773c840e1b527f894e83048f0be61869c409a) Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
This commit is contained in:
parent
3a08a23b13
commit
467ea87e0c
1 changed files with 1 additions and 1 deletions
|
|
@ -1095,7 +1095,7 @@ static struct fdinfo_list_entry *get_fle_for_task(struct file_desc *tgt, struct
|
|||
* we need to ... invent a new one!
|
||||
*/
|
||||
|
||||
e = xmalloc(sizeof(*e));
|
||||
e = shmalloc(sizeof(*e));
|
||||
if (!e)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue