On Tue, 15 Nov 2011 07:32:43 -0500 Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > 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? > No problem, it's really hard to tell which NULL pointer checks in the cifs code are meaningful since it's littered with useless ones. That's a good point about moving the check into the callers. I just resent a respun patch that I think will do the right thing... -- Jeff Layton <jlayton@xxxxxxxxxx> -- 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