linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: syzbot <syzbot+8ec30bb7bf1a981a2012@syzkaller.appspotmail.com>
Cc: arve@android.com, devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hugh Dickins <hughd@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	maco@android.com, syzkaller-bugs@googlegroups.com,
	tkjos@android.com
Subject: Re: possible deadlock in shmem_file_llseek
Date: Wed, 24 Jan 2018 19:43:51 +0100	[thread overview]
Message-ID: <CACT4Y+aRpitnB_0JFNAyLVzbZnGSx+vNCOig3XiLL7dV988XWw@mail.gmail.com> (raw)
In-Reply-To: <001a113f932c939af705638a07fd@google.com>

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

On Wed, Jan 24, 2018 at 7:42 PM, syzbot
<syzbot+8ec30bb7bf1a981a2012@syzkaller.appspotmail.com> wrote:
> Hello,
>
> syzbot tried to test the proposed patch but build/boot failed:
>
> patch is already applied
>
>
> Tested on https://github.com/joelagnel/linux.git/test-ashmem commit
> 32f813bb0d06c1e189ac336f8c3c7377f85c71f0 (Wed Jan 24 01:45:04 2018 +0000)
> ashmem: Fix lockdep issue during llseek
>
> compiler: gcc (GCC) 7.1.1 20170620
> Patch is attached.

Right. We probably want:

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 450 bytes --]

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 0f695df14c9d..248983cf2db1 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -343,7 +343,9 @@ static loff_t ashmem_llseek(struct file *file, loff_t offset, int origin)
 		goto out;
 	}
 
+	mutex_unlock(&ashmem_mutex);
 	ret = vfs_llseek(asma->file, offset, origin);
+	mutex_lock(&ashmem_mutex);
 	if (ret < 0)
 		goto out;
 

  reply	other threads:[~2018-01-24 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  6:58 syzbot
2018-01-10  8:02 ` Dmitry Vyukov
2018-01-24 17:47 ` Joel Fernandes
2018-01-24 18:40   ` Dmitry Vyukov
2018-01-24 18:42     ` syzbot
2018-01-24 18:43       ` Dmitry Vyukov [this message]
2018-01-24 19:01         ` syzbot
2018-01-24 21:11     ` Joel Fernandes
2018-01-30  3:05     ` Joel Fernandes
2018-01-31 17:23 Joel Fernandes
2018-01-31 17:42 ` syzbot

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=CACT4Y+aRpitnB_0JFNAyLVzbZnGSx+vNCOig3XiLL7dV988XWw@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maco@android.com \
    --cc=syzbot+8ec30bb7bf1a981a2012@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox