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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Aug 2020 18:40:36 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Xu Wang <vulab@...as.ac.cn>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Tejun Heo <tj@...nel.org>,
        Giuseppe Scrivano <gscrivan@...hat.com>
Subject: Re: [PATCH] hugetlb_cgroup: convert comma to semicolon

On Tue, 18 Aug 2020 06:43:33 +0000 Xu Wang <vulab@...as.ac.cn> wrote:

> Replace a comma between expression statements by a semicolon.
> 
> ...
>
> --- a/mm/hugetlb_cgroup.c
> +++ b/mm/hugetlb_cgroup.c
> @@ -655,7 +655,7 @@ static void __init __hugetlb_cgroup_file_dfl_init(int idx)
>  	snprintf(cft->name, MAX_CFTYPE_NAME, "%s.events", buf);
>  	cft->private = MEMFILE_PRIVATE(idx, 0);
>  	cft->seq_show = hugetlb_events_show;
> -	cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]),
> +	cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]);
>  	cft->flags = CFTYPE_NOT_ON_ROOT;
>  
>  	/* Add the events.local file */
> @@ -664,7 +664,7 @@ static void __init __hugetlb_cgroup_file_dfl_init(int idx)
>  	cft->private = MEMFILE_PRIVATE(idx, 0);
>  	cft->seq_show = hugetlb_events_local_show;
>  	cft->file_offset = offsetof(struct hugetlb_cgroup,
> -				    events_local_file[idx]),
> +				    events_local_file[idx]);
>  	cft->flags = CFTYPE_NOT_ON_ROOT;
>  
>  	/* NULL terminate the last cft */

Fixes: faced7e0806cf4 ("mm: hugetlb controller for cgroups v2")

Wow, why does this code even work.  Presumably the initial value of
cft->file_offset simply doesn't matter.  Giuseppe, could you please
check?  We might have some unneeded code in there.

Powered by blists - more mailing lists