Hal Rosenstock wrote:
What stops the net_device from being pulled from underneath this ? Seems
like a similar issue to me. The difference I see is that only
net_devices need to be tracked rather than perhaps net_devices and
ib_devices.

A reference on the net_device needs to be held while this is being read. Net_devices already have reference counting that comes with them; this would need to be added to ib_devices. E.g.

dev = ip_dev_find(ip);
gid = dev->dev_addr + 4;
pkey = get_pkey(dev->broadcast);
dev_put(dev);

could be used to convert a local IP address to a GID/PKey.

I'm assuming that neigh_lookup() provides the same protection: that neigh->dev is valid while a reference on the neigh is held (until neigh_release is called). Does anyone know if this is the case?

- Sean
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to