bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()


From: Samuel Thibault
Subject: Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()
Date: Sun, 3 Nov 2019 18:58:57 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Joan Lledó via Bug reports for the GNU Hurd, le dim. 03 nov. 2019 18:49:08 
+0100, a ecrit:
> El 3/11/19 a les 17:10, Samuel Thibault ha escrit:
> >> +            if (!devices)
> >> +                return ENOMEM;
> > 
> > That makes me realize: we need to closedir(dir).
> 
> What do you mean?

The function currently calls opendir(), but never calls the
corresponding closedir(), so it leaks memory.

> Take a look at hurd_pci.c:452 [1]
> 
>     /* If we can open pci cfg io ports on hurd,
>      * we are the arbiter, therefore try x86 method first */
>     err = pci_system_x86_create();

Uh, that is not what we have in the current Debian package. Somehow that
version didn't get submitted here, only upstream. That is why there was
a misunderstanding.

That being said, how are we sure that the pci arbiter gets to run before
netdde?  Otherwise netdde will manage to open the PCI ports.

I was thinking we wanted to aim for the converse: instead of making
the first process to manage to open PCI ports, make all processes try
to open the pci arbiter, and let the pci arbiter notice that it is
connecting to itself, and then revert to the x86 method.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]