Skip to contentSkip to conversation

null pointer error in raw device I/O from kernel threads

DISCUSSION Andy Tai 1 participant 1 message Mar 15, 2002

lore
Share & tools
lore

Andy Tai

author
#0 lore raw

Hi, I am trying to do I/O to raw devices from within kernel threads. I got null pointer error because the raw device code references current->mm, but for kernel threads, current->mm is 0 (NULL). I tried to force it to use current->active_mm but the I/O operation returns EFAULT (-14).

Any advice on how to make raw device I/O work from kernel threads is appreciated.

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/