Re: [PATCH 2/2] iommu/omap: fix NULL pointer dereference

2012-02-22 Thread Russell King - ARM Linux
On Wed, Feb 22, 2012 at 10:52:52AM +0200, Ohad Ben-Cohen wrote: @@ -274,7 +274,7 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, mutex_lock(iommu_debug_lock); area = omap_find_iovm_area(dev, (u32)ppos); - if (IS_ERR(area)) { + if

Re: [PATCH 2/2] iommu/omap: fix NULL pointer dereference

2012-02-22 Thread Ohad Ben-Cohen
On Wed, Feb 22, 2012 at 10:56 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: There's something else which needs fixing here - the return code.  If omap_find_iovm_area() returns an error code that needs propagating. Otherwise it might as well just return NULL for all errors. Seems

Re: [PATCH 2/2] iommu/omap: fix NULL pointer dereference

2012-02-22 Thread Russell King - ARM Linux
On Wed, Feb 22, 2012 at 11:10:38AM +0200, Ohad Ben-Cohen wrote: On Wed, Feb 22, 2012 at 10:56 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: There's something else which needs fixing here - the return code.  If omap_find_iovm_area() returns an error code that needs propagating.