The HyperNews Linux KHG Discussion Pages

Feedback: Re: Getting struct *dev from user level.

Forum: Network Buffers And Memory Management
Re: Question Getting struct *dev from user level. (Pedro Miguel de Sousa Caria)
Date: Thu, 16 Oct 1997 11:02:18 GMT
From: Alan Cox <Alan.Cox@cymru.net>

Within the kernel

struct device *foo=dev_get(name)

Note that if you sleep the pointer may become invalid. To avoid this you either need a notifier on the device notifier or to use


	dev_lock_list()
	dev_unlock_list()

around the code area concerned.

You can't get to dev structs from user space (obviously)