Re: [PATCH] cifs: re-add NULL pointer check in cifs_save_resume_key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 15, 2011 at 06:24:58AM -0500, Jeff Layton wrote:
> Prior to commit eaf35b1, cifs_save_resume_key had some NULL pointer
> checks at the top. It turns out that at least one of those NULL
> pointer checks is needed after all.
> 
> When the LastNameOffset in a FIND reply appears to be beyond the end of
> the buffer, CIFSFindFirst and CIFSFindNext will set srch_inf.last_entry
> to NULL. Since eaf35b1, the code will now oops in this situation.
> 
> This patch just readds the NULL pointer check for file_info in
> cifs_save_resume_key to prevent the code from oopsing.

Ooops. sorry.  Can you move the checks into the callers instead, to
make it more obvious what is going here, if needed including comments?

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux