Hi, I actually extended the if statement as follows: if (file->private_data != NULL && file->private_data != &pmem[id].dev)
Also, at the beginning of the has_allocation function I changed the if statement: if (unlikely(!file->private_data || file->private_data == &pmem[id].dev)) At least for the scenarios I am using this is working just fine. The only potential problem is that we are overriding the value that was written by misc_open function. But, if I understand the the patch at misc_open, it was added just in order to pass the miscdevice pointer to the opened device. The opened device is not obligated to use that pointer, and it can override the private_data if it wants to. I also found few other misc drivers who are overriding the private_data field. Thanks, Shlomi -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel