You are right that we need to do the null check but it needs to  be one line higher since the UCS conversion function does not check in the unlikely event that the target path is null.  I moved the check up one line and committed.<br>
<br><div class="gmail_quote">On Mon, Aug 31, 2009 at 8:28 AM, Roel Kluin <span dir="ltr">&lt;<a href="mailto:roel.kluin@gmail.com">roel.kluin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
allocation may fail, prevent a NULL dereference.<br>
<br>
Signed-off-by: Roel Kluin &lt;<a href="mailto:roel.kluin@gmail.com">roel.kluin@gmail.com</a>&gt;<br>
---<br>
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c<br>
index b195773..7ea3240 100644<br>
--- a/fs/cifs/cifssmb.c<br>
+++ b/fs/cifs/cifssmb.c<br>
@@ -3963,6 +3963,10 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,<br>
                                                GFP_KERNEL);<br>
                        cifsConvertToUCS((__le16 *) tmp, searchName,<br>
                                        PATH_MAX, nls_codepage, remap);<br>
+                       if (tmp == NULL) {<br>
+                               rc = -ENOMEM;<br>
+                               goto parse_DFS_referrals_exit;<br>
+                       }<br>
                        node-&gt;path_consumed = cifs_ucs2_bytes(tmp,<br>
                                        le16_to_cpu(pSMBr-&gt;PathConsumed),<br>
                                        nls_codepage);<br>
</blockquote></div><br><br clear="all"><br>-- <br>Thanks,<br><br>Steve<br>