lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x49r3oc6vj6.fsf@segfault.boston.devel.redhat.com>
Date:	Mon, 13 Jul 2015 09:23:41 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Matthew Wilcox <matthew.r.wilcox@...el.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Matthew Wilcox <willy@...ux.intel.com>
Subject: Re: [PATCH 06/10] mm: Add vmf_insert_pfn_pmd()

Matthew Wilcox <matthew.r.wilcox@...el.com> writes:

> +static int insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,
> +		pmd_t *pmd, unsigned long pfn, pgprot_t prot, bool write)
> +{
> +	struct mm_struct *mm = vma->vm_mm;
> +	pmd_t entry;
> +	spinlock_t *ptl;
> +
> +	ptl = pmd_lock(mm, pmd);
> +	if (pmd_none(*pmd)) {
> +		entry = pmd_mkhuge(pfn_pmd(pfn, prot));
> +		if (write) {
> +			entry = pmd_mkyoung(pmd_mkdirty(entry));
> +			entry = maybe_pmd_mkwrite(entry, vma);
> +		}
> +		set_pmd_at(mm, addr, pmd, entry);
> +		update_mmu_cache_pmd(vma, addr, pmd);
> +	}
> +	spin_unlock(ptl);
> +	return VM_FAULT_NOPAGE;
> +}

What's the point of the return value?

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ