[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] tools/libs/gnttab: decouple more from mini-os



On 10.01.22 19:56, Andrew Cooper wrote:
On 07/01/2022 10:35, Juergen Gross wrote:
@@ -54,8 +70,11 @@ int osdep_gnttab_close(xengnttab_handle *xgt)
void minios_gnttab_close_fd(int fd)
  {
-    gntmap_fini(&files[fd].gntmap);
-    files[fd].type = FTYPE_NONE;
+    struct file *file = get_file_from_fd(fd);
+
+    gntmap_fini(file->dev);
+    free(file->dev);

file->dev = NULL ?

Particularly as this is a pointer in a global files[] array.

I'll reset all the struct file contents in close() for all file types.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.