public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+353d7b75658a95aa955a@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [kernel?] upstream test error: KASAN: slab-use-after-free Write in binderfs_evict_inode
Date: Wed, 12 Mar 2025 22:30:26 -0700	[thread overview]
Message-ID: <67d26d72.050a0220.1939a6.0045.GAE@google.com> (raw)
In-Reply-To: <67d23488.050a0220.14e108.002a.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [kernel?] upstream test error: KASAN: slab-use-after-free Write in binderfs_evict_inode
Author: lizhi.xu@windriver.com

#syz test

diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index bc6bae76ccaf..9ac152548030 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -271,12 +271,12 @@ static void binderfs_evict_inode(struct inode *inode)
 	mutex_lock(&binderfs_minors_mutex);
 	--info->device_count;
 	ida_free(&binderfs_minors, device->miscdev.minor);
-	mutex_unlock(&binderfs_minors_mutex);
 
 	if (refcount_dec_and_test(&device->ref)) {
 		kfree(device->context.name);
 		kfree(device);
 	}
+	mutex_unlock(&binderfs_minors_mutex);
 }
 
 static int binderfs_fs_context_parse_param(struct fs_context *fc,

  reply	other threads:[~2025-03-13  5:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  1:27 [syzbot] [kernel?] upstream test error: KASAN: slab-use-after-free Write in binderfs_evict_inode syzbot
2025-03-13  5:30 ` syzbot [this message]
2025-03-13  9:41 ` [syzbot] " 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=67d26d72.050a0220.1939a6.0045.GAE@google.com \
    --to=syzbot+353d7b75658a95aa955a@syzkaller.appspotmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox