[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <164135246476.257673.914145446344436987.b4-ty@mit.edu>
Date: Tue, 4 Jan 2022 22:14:37 -0500
From: "Theodore Ts'o" <tytso@....edu>
To: Lukas Czerner <lczerner@...hat.com>, linux-ext4@...r.kernel.org
Cc: "Theodore Ts'o" <tytso@....edu>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/2] ext4: don't use kfree() on rcu protected pointer sbi->s_qf_names
On Tue, 4 Jan 2022 15:35:17 +0100, Lukas Czerner wrote:
> During ext4 mount api rework the commit e6e268cb6822 ("ext4: move quota
> configuration out of handle_mount_opt()") introduced a bug where we
> would kfree(sbi->s_qf_names[i]) before assigning the new quota name in
> ext4_apply_quota_options().
>
> This is wrong because we're using kfree() on rcu prointer that could be
> simultaneously accessed from ext4_show_quota_options() during remount.
> Fix it by using rcu_replace_pointer() to replace the old qname with the
> new one and then kfree_rcu() the old quota name.
>
> [...]
Applied, thanks!
[1/2] ext4: don't use kfree() on rcu protected pointer sbi->s_qf_names
commit: e1577876127c1e6827225997b64ef3577a4afcf3
[2/2] ext4: only set EXT4_MOUNT_QUOTA when journalled quota file is specified
commit: d2717c29596304ada9edb78959baed8e0977018f
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists