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] [day] [month] [year] [list]
Date:	Thu, 10 Jan 2013 19:32:37 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:	Hideki EIRAKU <hdk@...l.co.jp>,
	Katsuya MATSUBARA <matsu@...l.co.jp>,
	Russell King <linux@....linux.org.uk>,
	Simon Horman <horms@...ge.net.au>, linux-sh@...r.kernel.org,
	Magnus Damm <magnus.damm@...il.com>,
	linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
	Paul Mundt <lethal@...ux-sh.org>,
	Damian Hobson-Garcia <dhobsong@...l.co.jp>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 1/4] iommu/shmobile: Add iommu driver for Renesas
 IPMMU modules

Hi,

On Mon, Jan 07, 2013 at 07:11:58PM +0100, Laurent Pinchart wrote:
> > +		l2index = (iova >> 12) & 0xff;
> > +		spin_lock(&sh_domain->map_lock);
> > +		ret = l2alloc(sh_domain, l1index);
> 
> l2alloc calls dma_pool_alloc(GFP_KERNEL), that not safe in a non-sleepable 
> context. Do we need a spinlock here, or could a mutex do ?

iommu_map should work in any context, so a mutex will not work. Also the
memory allocations in that path should be GFP_ATOMIC instead of
GFP_KERNEL.

Other than that this driver looks good from an IOMMU-API perspective.
Please Cc me on future versions of this patch-set directly.

Thanks,

	Joerg

--
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