All of lore.kernel.org
 help / color / mirror / Atom feed
From: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
To: gustavoars@kernel.org, viro@zeniv.linux.org.uk
Cc: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	slava@dubeyko.com, skhan@linuxfoundation.org,
	gregkh@linuxfoundation.org,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: [PATCH v2 0/3] hfs: fix various errors
Date: Thu,  1 Jul 2021 11:07:53 +0800	[thread overview]
Message-ID: <20210701030756.58760-1-desmondcheongzx@gmail.com> (raw)

Hi,

This series ultimately aims to address a lockdep warning in hfs_find_init reported by Syzbot:
https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db

The work done for this led to the discovery of another bug, and the Syzkaller repro test also reveals an invalid memory access error after clearing the lockdep warning. Hence, this series is broken up into three patches:

1. Add a missing call to hfs_find_exit for an error path in hfs_fill_super

2. Fix memory mapping in hfs_bnode_read by fixing calls to kmap

3. Add lock nesting notation to tell lockdep that the observed locking hierarchy is safe

v1 -> v2:
Patch 1: Consolidated calls to hfs_find_exit on error paths in hfs_fill_super, as suggested by Viacheslav Dubeyko.
Patch 2: Added safety checks, clarified code, and switched from kmap/kunmap to kmap_atomic/kunmap_atomic, as suggested by Viacheslav Dubeyko.

Desmond Cheong Zhi Xi (3):
  hfs: add missing clean-up in hfs_fill_super
  hfs: fix high memory mapping in hfs_bnode_read
  hfs: add lock nesting notation to hfs_find_init

 fs/hfs/bfind.c | 14 +++++++++++++-
 fs/hfs/bnode.c | 25 ++++++++++++++++++++-----
 fs/hfs/btree.h |  7 +++++++
 fs/hfs/super.c | 10 +++++-----
 4 files changed, 45 insertions(+), 11 deletions(-)

-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
To: gustavoars@kernel.org, viro@zeniv.linux.org.uk
Cc: linux-kernel@vger.kernel.org, slava@dubeyko.com,
	linux-fsdevel@vger.kernel.org,
	Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: [PATCH v2 0/3] hfs: fix various errors
Date: Thu,  1 Jul 2021 11:07:53 +0800	[thread overview]
Message-ID: <20210701030756.58760-1-desmondcheongzx@gmail.com> (raw)

Hi,

This series ultimately aims to address a lockdep warning in hfs_find_init reported by Syzbot:
https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db

The work done for this led to the discovery of another bug, and the Syzkaller repro test also reveals an invalid memory access error after clearing the lockdep warning. Hence, this series is broken up into three patches:

1. Add a missing call to hfs_find_exit for an error path in hfs_fill_super

2. Fix memory mapping in hfs_bnode_read by fixing calls to kmap

3. Add lock nesting notation to tell lockdep that the observed locking hierarchy is safe

v1 -> v2:
Patch 1: Consolidated calls to hfs_find_exit on error paths in hfs_fill_super, as suggested by Viacheslav Dubeyko.
Patch 2: Added safety checks, clarified code, and switched from kmap/kunmap to kmap_atomic/kunmap_atomic, as suggested by Viacheslav Dubeyko.

Desmond Cheong Zhi Xi (3):
  hfs: add missing clean-up in hfs_fill_super
  hfs: fix high memory mapping in hfs_bnode_read
  hfs: add lock nesting notation to hfs_find_init

 fs/hfs/bfind.c | 14 +++++++++++++-
 fs/hfs/bnode.c | 25 ++++++++++++++++++++-----
 fs/hfs/btree.h |  7 +++++++
 fs/hfs/super.c | 10 +++++-----
 4 files changed, 45 insertions(+), 11 deletions(-)

-- 
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

             reply	other threads:[~2021-07-01  3:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  3:07 Desmond Cheong Zhi Xi [this message]
2021-07-01  3:07 ` [PATCH v2 0/3] hfs: fix various errors Desmond Cheong Zhi Xi
2021-07-01  3:07 ` [PATCH v2 1/3] hfs: add missing clean-up in hfs_fill_super Desmond Cheong Zhi Xi
2021-07-01  3:07   ` Desmond Cheong Zhi Xi
2021-07-01 17:03   ` Viacheslav Dubeyko
2021-07-01 17:03     ` Viacheslav Dubeyko
2021-07-01  3:07 ` [PATCH v2 2/3] hfs: fix high memory mapping in hfs_bnode_read Desmond Cheong Zhi Xi
2021-07-01  3:07   ` Desmond Cheong Zhi Xi
2021-07-01 17:03   ` Viacheslav Dubeyko
2021-07-01 17:03     ` Viacheslav Dubeyko
2021-07-01  3:07 ` [PATCH v2 3/3] hfs: add lock nesting notation to hfs_find_init Desmond Cheong Zhi Xi
2021-07-01  3:07   ` Desmond Cheong Zhi Xi
2021-07-01 17:04   ` Viacheslav Dubeyko
2021-07-01 17:04     ` Viacheslav Dubeyko
2021-07-01 17:03 ` [PATCH v2 0/3] hfs: fix various errors Viacheslav Dubeyko
2021-07-01 17:03   ` Viacheslav Dubeyko

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=20210701030756.58760-1-desmondcheongzx@gmail.com \
    --to=desmondcheongzx@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=slava@dubeyko.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.