All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: liuhailong <liuhailong@oppo.com>
Cc: arve@android.com, tkjos@android.com, maco@android.com,
	joel@joelfernandes.org, christian@brauner.io, hridya@google.com,
	surenb@google.com, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: android: ashmem: add size field in procfs fdinfo
Date: Fri, 18 Jun 2021 12:23:20 +0200	[thread overview]
Message-ID: <YMx0GIRQmpRC7pdQ@kroah.com> (raw)
In-Reply-To: <20210618095035.32410-1-liuhailong@oppo.com>

On Fri, Jun 18, 2021 at 05:50:35PM +0800, liuhailong wrote:
> add this information to help user to find ashmem problem.
> 
> ashmem leak scenario:
> -000|fd = ashmem_create_region
> -001|mmap and pagefault
> -002|munmap
> -003|forget close(fd) <---- which lead to ashmem leak
> 
> Signed-off-by: liuhailong <liuhailong@oppo.com>
> ---
>  drivers/staging/android/ashmem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
> index d66a64e42273..ee2fd75111d8 100644
> --- a/drivers/staging/android/ashmem.c
> +++ b/drivers/staging/android/ashmem.c
> @@ -894,6 +894,8 @@ static void ashmem_show_fdinfo(struct seq_file *m, struct file *file)
>  		seq_printf(m, "name:\t%s\n",
>  			   asma->name + ASHMEM_NAME_PREFIX_LEN);
>  
> +	seq_printf(m, "size:\t%zu\n", asma->size);
> +
>  	mutex_unlock(&ashmem_mutex);
>  }
>  #endif
> -- 
> 2.30.2
> 
> 

As you are changing a user-facing proc file, what tools will break now
that you have added a new line?

What tools do you use to look at this file and what has been modified to
handle the change?

thanks,

greg k-h

  reply	other threads:[~2021-06-18 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  9:50 [PATCH] staging: android: ashmem: add size field in procfs fdinfo liuhailong
2021-06-18 10:23 ` Greg KH [this message]
2021-06-18 10:40   ` 回复: " 刘海龙(DuckBuBee)
2021-06-18 11:04     ` Greg KH
2021-06-18 11:04   ` 刘海龙(DuckBuBee)

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=YMx0GIRQmpRC7pdQ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arve@android.com \
    --cc=christian@brauner.io \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=liuhailong@oppo.com \
    --cc=maco@android.com \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /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.