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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221107123755.vrailpdu5wxrb7se@quack3>
Date:   Mon, 7 Nov 2022 13:37:55 +0100
From:   Jan Kara <jack@...e.cz>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Theodore Tso <tytso@....edu>, Jan Kara <jack@...e.com>,
        linux-ext4@...r.kernel.org
Subject: Re: [RFC][PATCH v3 30/33] timers: jbd2: Use timer_shutdown() before
 freeing timer

On Fri 04-11-22 01:41:23, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
> 
> Before a timer is freed, timer_shutdown() must be called. Note that it is
> assumed that the timer is not running while being freed, so only
> timer_shutdown() is used, and not timer_shutdown_sync().
> 
> Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/
> 
> Cc: "Theodore Ts'o" <tytso@....edu>
> Cc: Jan Kara <jack@...e.com>
> Cc: linux-ext4@...r.kernel.org
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>

Looks good to me. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/jbd2/journal.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 2696f43e7239..57d2445d8c8b 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -2157,6 +2157,8 @@ int jbd2_journal_destroy(journal_t *journal)
>  	J_ASSERT(journal->j_checkpoint_transactions == NULL);
>  	spin_unlock(&journal->j_list_lock);
>  
> +	timer_shutdown(&journal->j_commit_timer);
> +
>  	/*
>  	 * OK, all checkpoint transactions have been checked, now check the
>  	 * write out io error flag and abort the journal if some buffer failed
> -- 
> 2.35.1
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ