public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [for-linus][PATCH 0/2] tracing: Two more small fixes for v6.7-rc8
Date: Tue, 02 Jan 2024 20:50:43 -0500	[thread overview]
Message-ID: <20240103015043.912131206@goodmis.org> (raw)


tracing fixes for v6.7-rc8:

- Fix a NULL kernel dereference in set_gid() on tracefs mounting.
  When tracefs is mounted with "gid=1000", it will update the existing
  dentries to have the new gid. The tracefs_inode which is retrieved
  by a container_of(dentry->d_inode) has flags to see if the inode
  belongs to the eventfs system.

  The issue that was fixed was if getdents() was called on tracefs
  that was previously mounted, and was not closed. It will leave
  a "cursor dentry" in the subdirs list of the current dentries that
  set_gid() walks. On a remount of tracefs, the container_of(dentry->d_inode)
  will dereference a NULL pointer and cause a crash when referenced.

  Simply have a check for dentry->d_inode to see if it is NULL and if
  so, skip that entry.

- Fix the bits of the eventfs_inode structure. The "is_events" bit
  was taken  from the nr_entries field, but the nr_entries field wasn't
  updated to be 30 bits and was still 31. Including the "is_freed" bit
  this would use 33 bits which would make the structure use another
  integer for just one bit.

Steven Rostedt (Google) (2):
      tracefs: Check for dentry->d_inode exists in set_gid()
      eventfs: Fix bitwise fields for "is_events"

----
 fs/tracefs/inode.c    | 4 ++++
 fs/tracefs/internal.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

             reply	other threads:[~2024-01-03  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  1:50 Steven Rostedt [this message]
2024-01-03  1:50 ` [for-linus][PATCH 1/2] tracefs: Check for dentry->d_inode exists in set_gid() Steven Rostedt
2024-01-03  1:50 ` [for-linus][PATCH 2/2] eventfs: Fix bitwise fields for "is_events" Steven Rostedt

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=20240103015043.912131206@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@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