All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Liam Howlett <liam.howlett@oracle.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: manual merge of the char-misc.current tree with the mm-hotfixes tree
Date: Fri, 19 Aug 2022 18:40:27 +1000	[thread overview]
Message-ID: <20220819184027.7b3fda3e@canb.auug.org.au> (raw)
In-Reply-To: <Yv8vZQB25NE0r/uN@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 4940 bytes --]

Hi Greg,

On Fri, 19 Aug 2022 08:36:21 +0200 Greg KH <greg@kroah.com> wrote:
>
> On Fri, Aug 19, 2022 at 08:28:18AM +1000, Stephen Rothwell wrote:
> > 
> > Today's linux-next merge of the char-misc.current tree got a conflict in:
> > 
> >   drivers/android/binder_alloc.c
> > 
> > between commit:
> > 
> >   b3bb668f3dc6 ("binder_alloc: add missing mmap_lock calls when using the VMA")
> > 
> > from the mm-hotfixes tree and commit:
> > 
> >   d6f35446d076 ("binder_alloc: Add missing mmap_lock calls when using the VMA")
> > 
> > from the char-misc.current tree.
> > 
> > I fixed it up (I used the latter as it was committed later even though
> > the author times were the same) 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.  
> 
> These should be identical, if not, something went wrong :(

Something went wrong :-)

$ git range-diff b3bb668f3dc6^..b3bb668f3dc6 d6f35446d076^..d6f35446d076
1:  b3bb668f3dc6 ! 1:  d6f35446d076 binder_alloc: add missing mmap_lock calls when using the VMA
    @@ Metadata
     Author: Liam Howlett <liam.howlett@oracle.com>
     
      ## Commit message ##
    -    binder_alloc: add missing mmap_lock calls when using the VMA
    +    binder_alloc: Add missing mmap_lock calls when using the VMA
     
    -    Take the mmap_read_lock() when using the VMA in binder_alloc_print_pages()
    -    and when checking for a VMA in binder_alloc_new_buf_locked().
    +    Take the mmap_read_lock() when using the VMA in
    +    binder_alloc_print_pages() and when checking for a VMA in
    +    binder_alloc_new_buf_locked().
     
         It is worth noting binder_alloc_new_buf_locked() drops the VMA read lock
    -    after it verifies a VMA exists, but may be taken again deeper in the call
    -    stack, if necessary.
    +    after it verifies a VMA exists, but may be taken again deeper in the
    +    call stack, if necessary.
     
    -    Link: https://lkml.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com
    -    Fixes: a43cfc87caaf ("android: binder: stop saving a pointer to the VMA")
    -    Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
    +    Fixes: a43cfc87caaf (android: binder: stop saving a pointer to the VMA)
    +    Cc: stable <stable@kernel.org>
         Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
    -    Reported-by: <syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com>
    -    Acked-by: Carlos Llamas <cmllamas@google.com>
    +    Reported-by: syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com
         Tested-by: Ondrej Mosnacek <omosnace@redhat.com>
    -    Cc: Minchan Kim <minchan@kernel.org>
    -    Cc: Christian Brauner (Microsoft) <brauner@kernel.org>
    -    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    -    Cc: Hridya Valsaraju <hridya@google.com>
    -    Cc: Joel Fernandes <joel@joelfernandes.org>
    -    Cc: Martijn Coenen <maco@android.com>
    -    Cc: Suren Baghdasaryan <surenb@google.com>
    -    Cc: Todd Kjos <tkjos@android.com>
    -    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    -    Cc: "Arve Hjønnevåg" <arve@android.com>
    -    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    +    Acked-by: Carlos Llamas <cmllamas@google.com>
    +    Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
    +    Link: https://lore.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com
    +    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
     
      ## drivers/android/binder_alloc.c ##
     @@ drivers/android/binder_alloc.c: static struct binder_buffer *binder_alloc_new_buf_locked(
    @@ drivers/android/binder_alloc.c: void binder_alloc_print_pages(struct seq_file *m
     -		}
     +
     +	mmap_read_lock(alloc->vma_vm_mm);
    -+	if (binder_alloc_get_vma(alloc) == NULL)
    ++	if (binder_alloc_get_vma(alloc) == NULL) {
    ++		mmap_read_unlock(alloc->vma_vm_mm);
     +		goto uninitialized;
    + 	}
     +
    ++	mmap_read_unlock(alloc->vma_vm_mm);
     +	for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
     +		page = &alloc->pages[i];
     +		if (!page->page_ptr)
    @@ drivers/android/binder_alloc.c: void binder_alloc_print_pages(struct seq_file *m
     +			active++;
     +		else
     +			lru++;
    - 	}
    ++	}
     +
     +uninitialized:
    -+	mmap_read_unlock(alloc->vma_vm_mm);
      	mutex_unlock(&alloc->mutex);
      	seq_printf(m, "  pages: %d:%d:%d\n", active, lru, free);
      	seq_printf(m, "  pages high watermark: %zu\n", alloc->pages_high);

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-08-19  8:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 22:28 linux-next: manual merge of the char-misc.current tree with the mm-hotfixes tree Stephen Rothwell
2022-08-19  6:36 ` Greg KH
2022-08-19  8:40   ` Stephen Rothwell [this message]
2022-08-19  8:55     ` Greg KH
2022-08-19 13:35       ` Liam Howlett
2022-08-19 15:44         ` Greg KH
2022-08-19 20:35         ` Andrew Morton
2022-08-19 22:02           ` Liam Howlett
2022-08-19 22:55             ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220819184027.7b3fda3e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=greg@kroah.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.