IRP_MN_MOUNT_VOLUME and ObQueryNameString
2011-11-22 20:33
597 查看
From:http://www.osronline.com/showThread.cfm?link=25276
<span style="font-size:18px;">This is a common problem for filter drivers trying to query the name of a file object.IIRC, when you call ObQueryNameString for a file object, it calls the query name method on the file object type. That method is implemented by the function IopQueryName which in turn calls IopQueryXxxInformation. If the file was opened for non-overlapped IO, the default for WIN32, IopQueryXxxInformation tries to synchronize the name query--IRP_MJ_QUERY_INFORMATION--with other operations on the file object, such as the IRP_MJ_CLEANUP you are filtering. This synchronization is done by treating the KEVENT Lock field of the file object like a mutex. Because ZwClose already locked the file object prior to your filter receiving the IRP_MJ_CLEANUP, and a KEVENT has no concept of recursive acquisition, you are experiencing a deadlock in IopQueryXxxInformation when it tries to lock the file object.I suggest you build the IRP_MJ_QUERY_INFORMATION with a FileInformationClass of FileNameInformation, and send it yourself. This will bypass acquiring the file object's lock, and the FSD will do the necessary synchronization using its FCB resources.</span>
相关文章推荐
- ObQueryNameString routine
- ObQueryNameString的使用--WD笔记
- ObQueryNameString的一个问题
- [PHP学习教程 - 网络]002.$_SERVER["SCRIPT_NAME"]、$_SERVER["PHP_SELF"]、$_SERVER["QUERY_STRING"]、$_SERVER["REQUEST_URI"]介绍($_SERVER URL Infomation)
- SCRIPT_NAME、PHP_SELF、QUERY_STRING"、REQUEST_URI
- PHP $_SERVER["QUERY_STRING"]、$_SERVER["REQUEST_URI"]、$_SERVER["SCRIPT_NAME"]和$_SERVER["PHP_SELF"]
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- $_SERVER["REQUEST_URI"],["QUERY_STRING"],["PHP_SELF"] ,["SCRIPT_NAME"]用法
- PHP获取当前url路径的函数及服务器变量:$_SERVER["QUERY_STRING"],$_SERVER["REQUEST_URI"],$_SERVER["SCRIPT_NAME"],$_SER
- PHP: Send the Authorization token in a header instead of on the querystring and 读取 XML
- select .. where name = "+ Request.QueryString["name"]的后果?
- PHP获取当前url路径的函数及服务器变量:$_SERVER["QUERY_STRING"],$_SERVER["REQUEST_URI"],$_SERVER["SCRIPT_NAME"],$_SERVER["PHP_SELF"]
- 详解$_SERVER 函数中QUERY_STRING、REQUEST_URI、SCRIPT_NAME和'PHP_SELF
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- solr web服务器管理界面_错误:查询 no field name specified in query and no default specified via 'df' param
- PHP $_SERVER["SCRIPT_NAME"]、$_SERVER["PHP_SELF"]、$_SERVER["QUERY_STRING"]、$_SERVER["REQUEST_URI"]
- Index and length must refer to a location within the string. Parameter name: length (mscorlib)
- $_SERVER['PHP_SELF']和$_SERVER['SCRIPT_NAME']和$_SERVER["QUERY_STRING"],$_SERVER["REQUEST_URI"]
- $_SERVER["SCRIPT_NAME"]、$_SERVER["PHP_SELF"]、$_SERVER["QUERY_STRING"]、$_SERVER["REQUEST_URI"]
- PHP获取当前url路径的函数及服务器变量:$_SERVER["QUERY_STRING"],$_SERVER["REQUEST_URI"],$_SERVER["SCRIPT_NAME"],$_SER