lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <172846194512.1442.15051268384195551570.tip-bot2@tip-bot2>
Date: Wed, 09 Oct 2024 08:19:05 -0000
From: "tip-bot2 for Ingo Molnar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Stephen Rothwell <sfr@...b.auug.org.au>, NeilBrown <neilb@...e.de>,
 Ingo Molnar <mingo@...nel.org>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: sched/core] fs/bcachefs: Fix __wait_on_freeing_inode()
 definition of waitqueue entry

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     7266f0a6d3bb73f42ea06656d3cc48c7d0386f71
Gitweb:        https://git.kernel.org/tip/7266f0a6d3bb73f42ea06656d3cc48c7d0386f71
Author:        Ingo Molnar <mingo@...nel.org>
AuthorDate:    Wed, 09 Oct 2024 10:00:09 +02:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 09 Oct 2024 10:00:09 +02:00

fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry

The following recent commit made DEFINE_WAIT_BIT() type requirements stricter:

  2382d68d7d43 ("sched: change wake_up_bit() and related function to expect unsigned long *")

.. which results in a build failure:

  > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode':
  > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types]
  >   281 |         DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);

Since this code relies on the waitqueue initialization within
inode_bit_waitqueue() anyway, the DEFINE_WAIT_BIT() initialization
is unnecessary - we can just declare a waitqueue entry.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Suggested-by: NeilBrown <neilb@...e.de>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 fs/bcachefs/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 5bfc26d..c410133 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -183,8 +183,9 @@ static void __wait_on_freeing_inode(struct bch_fs *c,
 				    struct bch_inode_info *inode,
 				    subvol_inum inum)
 {
+	struct wait_bit_queue_entry wait;
 	wait_queue_head_t *wq;
-	DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
+
 	wq = inode_bit_waitqueue(&wait, &inode->v, __I_NEW);
 	prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
 	spin_unlock(&inode->v.i_lock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ