Skip to content

Patches for -next

Russell King - ARM Linux linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 4 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Patches for -next

Review

Quoted 5 lines · Catalin Marinas
(quoted diff) +5 -0
+#ifdef CONFIG_SMP
+void __sync_icache_dcache(pte_t pteval)
+{
+	struct page *page = pte_page(pteval);
+	struct address_space *mapping = page_mapping(page);

Err. no. You're assuming that the physical page associated with the PTE always has a struct page. What if it's a device mapping? What if it's a mapping for some memory which isn't being handled by the kernel?

You want this to be:

	unsigned long pfn = pte_pfn(pteval);

	if (pfn_valid(pfn)) {
		struct page *page = pfn_to_page(pfn);
		struct address_space *mapping = page_mapping(page);