Re: [PATCH] Fix show_mem panic

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2004-03-13 05:00:29
>>>>> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 12 13:02:02 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:24 EST