Re: [PATCH] Fix show_mem panic

David Mosberger
2004-03-12T18:00:29Z

>>>>> On Fri, 12 Mar 2004 07:24:02 -0700 (MST), John Marvin <jsm@udlkern.fc.hp.com> said:

John> ia64_pfn_valid (unsigned long pfn)
John> {
John> char byte;
John> + struct page *page = pfn_to_page(pfn);

John> - return __get_user(byte, (char *) pfn_to_page(pfn)) = 0;
John> + return (__get_user(byte, (char *) page) = 0)
John> + && (__get_user(byte, (char *) (page + 1) - 1) = 0);
John> }

Would it make sense to do only the first __get_user() _unless_ the
"struct page" crosses a page?

--david