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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2017 15:30:15 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Greg KH <greg@...ah.com>,
        Mauro Carvalho Chehab <mchehab@....samsung.com>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Georgiana Chelu <georgiana.chelu93@...il.com>,
        Aishwarya Pant <aishpant@...il.com>
Subject: linux-next: manual merge of the staging tree with the v4l-dvb tree

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in:

  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c

between commit:

  309167b966b6 ("media: staging: atomisp: cleanup out of memory messages")

from the v4l-dvb tree and commit:

  63342e75e661 ("Staging: media: atomisp: Use kmalloc_array instead of kmalloc")

from the staging tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
index 9e957514108e,5232327f5d9c..000000000000
--- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
@@@ -721,10 -725,12 +721,10 @@@ static int alloc_private_pages(struct h
  
  	pgnr = bo->pgnr;
  
- 	bo->page_obj = kmalloc(sizeof(struct hmm_page_object) * pgnr,
+ 	bo->page_obj = kmalloc_array(pgnr, sizeof(struct hmm_page_object),
  				GFP_KERNEL);
 -	if (unlikely(!bo->page_obj)) {
 -		dev_err(atomisp_dev, "out of memory for bo->page_obj\n");
 +	if (unlikely(!bo->page_obj))
  		return -ENOMEM;
 -	}
  
  	i = 0;
  	alloc_pgnr = 0;
@@@ -984,13 -990,16 +984,13 @@@ static int alloc_user_pages(struct hmm_
  	struct vm_area_struct *vma;
  	struct page **pages;
  
- 	pages = kmalloc(sizeof(struct page *) * bo->pgnr, GFP_KERNEL);
+ 	pages = kmalloc_array(bo->pgnr, sizeof(struct page *), GFP_KERNEL);
 -	if (unlikely(!pages)) {
 -		dev_err(atomisp_dev, "out of memory for pages...\n");
 +	if (unlikely(!pages))
  		return -ENOMEM;
 -	}
  
- 	bo->page_obj = kmalloc(sizeof(struct hmm_page_object) * bo->pgnr,
+ 	bo->page_obj = kmalloc_array(bo->pgnr, sizeof(struct hmm_page_object),
  		GFP_KERNEL);
  	if (unlikely(!bo->page_obj)) {
 -		dev_err(atomisp_dev, "out of memory for bo->page_obj...\n");
  		kfree(pages);
  		return -ENOMEM;
  	}
@@@ -1350,9 -1363,10 +1350,9 @@@ void *hmm_bo_vmap(struct hmm_buffer_obj
  		bo->status &= ~(HMM_BO_VMAPED | HMM_BO_VMAPED_CACHED);
  	}
  
- 	pages = kmalloc(sizeof(*pages) * bo->pgnr, GFP_KERNEL);
+ 	pages = kmalloc_array(bo->pgnr, sizeof(*pages), GFP_KERNEL);
  	if (unlikely(!pages)) {
  		mutex_unlock(&bo->mutex);
 -		dev_err(atomisp_dev, "out of memory for pages...\n");
  		return NULL;
  	}
  

Powered by blists - more mailing lists