Re: [PATCH 055/190] Revert "fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres"

Pavel Machek
2021-04-22T08:42:13Z

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

On Wed 2021-04-21 14:58:50, Greg Kroah-Hartman wrote:
> This reverts commit 67e2d2eb542338145a2e0b2336c1cdabd2424fd3.
>
> Commits from @umn.edu addresses have been found to be submitted in "bad
> faith" to try to test the kernel community's ability to review "known
> malicious" changes. The result of these submissions can be found in a
> paper published at the 42nd IEEE Symposium on Security and Privacy
> entitled, "Open Source Insecurity: Stealthily Introducing
> Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
> of Minnesota) and Kangjie Lu (University of Minnesota).

This patch is correct AFAICT.
Pavel

> index f105746063ed..f89dcf9b6217 100644
> --- a/fs/ocfs2/dlm/dlmmaster.c
> +++ b/fs/ocfs2/dlm/dlmmaster.c
> @@ -2554,6 +2554,8 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
> if (!dlm_grab(dlm))
> return -EINVAL;
>
> + BUG_ON(target == O2NM_MAX_NODES);
> +
> name = res->lockname.name;
> namelen = res->lockname.len;
>

--
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]