Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scsi lib #280

Closed
wants to merge 64 commits into from
Closed

Scsi lib #280

wants to merge 64 commits into from

Conversation

bgly
Copy link
Contributor

@bgly bgly commented May 3, 2016

No description provided.

Christoph Hellwig and others added 30 commits March 4, 2016 23:24
(Fix possible usb-gadget + tcm-loop make_nexus breakage - Dan Carpenter)

Acked-by: Juergen Gross <jgross@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Chris Boot <bootc@bootc.net>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Vasu Dev <vasu.dev@linux.intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Vu Pham <vu@mellanox.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(Fix sbp_mgt_get_req() IS_ERR failure checking - Dan Carpenter)

Cc: Chris Boot <bootc@bootc.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Chris Boot <bootc@bootc.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This patch drops struct usbg_cmd->kref internal kref-erence
usage, for proper TARGET_SCF_ACK_KREF conversion.

Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(Add wrapper for handling pending_req tag failure - Juergen)
(Drop left-over se_cmd memset in scsiback_cmd_exec - Juergen)

Acked-by: Juergen Gross <jgross@suse.com>
Tested-by: Juergen Gross <jgross@suse.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Juergen Gross <jgross@suse.com>
Tested-by: Juergen Gross <jgross@suse.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Vasu Dev <vasu.dev@linux.intel.com>
Cc: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Vu Pham <vu@mellanox.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
 #cat  /sys/kernel/debug/qla2xxx/qla2xxx_31/tgt_sess
 qla2xxx_31
 Port ID   Port Name                Handle
 ff:fc:01  21:fd:00:05:33:c7:ec:16  0
 01:0e:00  21:00:00:24:ff:7b:8a:e4  1
 01:0f:00  21:00:00:24:ff:7b:8a:e5  2
 ....

(Drop ->check_initiator_node_acl() parameter usage - nab)

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Once connection request is accepted, one rx descriptor
is posted to receive login request. This descriptor has rx type,
but is outside the main pool of rx descriptors, and thus
was mistreated as tx type.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
We need an indication that isert_conn->iscsi_conn binding has
happened so we'll know not to invoke a connection reinstatement
on an unbound connection which will lead to a bogus isert_conn->conn
dereferece.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
No need to restrict this check to specific events.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
When we receive an event that triggers connection termination,
we have a a couple of things we may want to do:
1. In case we are already terminating, bailout early
2. In case we are connected but not bound, disconnect and schedule
   a connection cleanup silently (don't reinstate)
3. In case we are connected and bound, disconnect and reinstate the connection

This rework fixes a bug that was detected against a mis-behaved
initiator which rejected our rdma_cm accept, in this stage the
isert_conn is no bound and reinstate caused a bogus dereference.

What's great about this is that we don't need the
post_recv_buf_count anymore, so get rid of it.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
With current termination flow we call release_conn after completion.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
We can never get to isert_wait_conn in INIT state anymore, so
get rid of this condition.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This is the same as ISCSI_DEF_MAX_RECV_SEG_LEN (and must be the same given
the structure layouts), so just use that constant instead.  This also
allows removing ISER_RX_LOGIN_SIZE in favor of ISER_RX_PAYLOAD_SIZE.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
The login receive buffer is used as a iser_rx_desc, so type it as such
in struct isert_conn and allocate the exactly right space for it.  The
TX buffer is moved to a separate variable and properly sized as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Use the workqueue based CQ type similar to what isert was using previously,
and properly split up the completion handlers.

Note that this also takes special care to handle the magic login WRs
separately, and also renames the submission functions so that it's clear
that they are only to be used for the login buffers.

(Fix up isert_print_wc usage in isert_beacon_done - nab)

Signed-off-by: Christoph Hellwig <hch@lst.de>
[sagig: added iscsi conn reinstatement in non-flush
 error completions and added error completion type print]
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
There is exactly one instance per struct isert_cmd, so merge the two to
simplify everyones life.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
We only use the pointer when processing regular iSER commands, and it then
always points to the struct iser_cmd that contains the TX descriptor.

Remove it and rely on container_of to save a little space and avoid a
pointer that is updated multiple times per processed command.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This patch has iblock pass the WRITE_SAME command to
the device for offloading if possible. It is similar to what is
done for UNMAP/discards, except that we export a large max write same
value to the initiator, and then rely on the block layer to
break it up into multiple requests if it cannot fit into one.

v2.

- Drop file backend changes and move helper function to
iblock backend.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
se_dev_entry.lun_flags and se_lun.lun_access are only used for keeping
track of read-write vs. read-only state. Since this is an either/or thing
we can represent it as bool, and remove the unneeded enum
transport_lunflags_table, which is left over from when there were more
flags.

Change code that uses this enum to just use true/false, and make it clear
through variable and param names that true means read-only, false means
read-write.

Signed-off-by: Andy Grover <agrover@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
We don't need use one iovec per scatter-gather list entry, since data
area are continuous.

Reviewed-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Sheng Yang <sheng@yasker.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Prepare for data_bitmap in the next patch.

Reviewed-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Sheng Yang <sheng@yasker.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
…a_tail

The data_bitmap was introduced to support asynchornization accessing of
data area.

We divide mailbox data area into blocks, and use data_bitmap to track the
usage of data area. All the new command's data would start with a new block,
and may left unusable space after it end. But it's easy to track using
data_bitmap.

Now we can allocate data area for asynchronization accessing from userspace,
since we can track the allocation using data_bitmap. The userspace part would
be the same as Maxim's previous asynchronized implementation.

Signed-off-by: Sheng Yang <sheng@yasker.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 6, 2019
Since setting global init process to some memory cgroup is technically
possible, oom_kill_memcg_member() must check it.

  Tasks in /test1 are going to be killed due to memory.oom.group set
  Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
  oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	static char buffer[10485760];
	static int pipe_fd[2] = { EOF, EOF };
	unsigned int i;
	int fd;
	char buf[64] = { };
	if (pipe(pipe_fd))
		return 1;
	if (chdir("/sys/fs/cgroup/"))
		return 1;
	fd = open("cgroup.subtree_control", O_WRONLY);
	write(fd, "+memory", 7);
	close(fd);
	mkdir("test1", 0755);
	fd = open("test1/memory.oom.group", O_WRONLY);
	write(fd, "1", 1);
	close(fd);
	fd = open("test1/cgroup.procs", O_WRONLY);
	write(fd, "1", 1);
	snprintf(buf, sizeof(buf) - 1, "%d", getpid());
	write(fd, buf, strlen(buf));
	close(fd);
	snprintf(buf, sizeof(buf) - 1, "%lu", sizeof(buffer) * 5);
	fd = open("test1/memory.max", O_WRONLY);
	write(fd, buf, strlen(buf));
	close(fd);
	for (i = 0; i < 10; i++)
		if (fork() == 0) {
			char c;
			close(pipe_fd[1]);
			read(pipe_fd[0], &c, 1);
			memset(buffer, 0, sizeof(buffer));
			sleep(3);
			_exit(0);
		}
	close(pipe_fd[0]);
	close(pipe_fd[1]);
	sleep(3);
	return 0;
}

[   37.052923][ T9185] a.out invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[   37.056169][ T9185] CPU: 4 PID: 9185 Comm: a.out Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 torvalds#280
[   37.059205][ T9185] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.062954][ T9185] Call Trace:
[   37.063976][ T9185]  dump_stack+0x67/0x95
[   37.065263][ T9185]  dump_header+0x51/0x570
[   37.066619][ T9185]  ? trace_hardirqs_on+0x3f/0x110
[   37.068171][ T9185]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.069967][ T9185]  oom_kill_process+0x18d/0x210
[   37.071515][ T9185]  out_of_memory+0x11b/0x380
[   37.072936][ T9185]  mem_cgroup_out_of_memory+0xb6/0xd0
[   37.074601][ T9185]  try_charge+0x790/0x820
[   37.076021][ T9185]  mem_cgroup_try_charge+0x42/0x1d0
[   37.077629][ T9185]  mem_cgroup_try_charge_delay+0x11/0x30
[   37.079370][ T9185]  do_anonymous_page+0x105/0x5e0
[   37.080939][ T9185]  __handle_mm_fault+0x9cb/0x1070
[   37.082485][ T9185]  handle_mm_fault+0x1b2/0x3a0
[   37.083819][ T9185]  ? handle_mm_fault+0x47/0x3a0
[   37.085181][ T9185]  __do_page_fault+0x255/0x4c0
[   37.086529][ T9185]  do_page_fault+0x28/0x260
[   37.087788][ T9185]  ? page_fault+0x8/0x30
[   37.088978][ T9185]  page_fault+0x1e/0x30
[   37.090142][ T9185] RIP: 0033:0x7f8b183aefe0
[   37.091433][ T9185] Code: 20 f3 44 0f 7f 44 17 d0 f3 44 0f 7f 47 30 f3 44 0f 7f 44 17 c0 48 01 fa 48 83 e2 c0 48 39 d1 74 a3 66 0f 1f 84 00 00 00 00 00 <66> 44 0f 7f 01 66 44 0f 7f 41 10 66 44 0f 7f 41 20 66 44 0f 7f 41
[   37.096917][ T9185] RSP: 002b:00007fffc5d329e8 EFLAGS: 00010206
[   37.098615][ T9185] RAX: 00000000006010e0 RBX: 0000000000000008 RCX: 0000000000c30000
[   37.100905][ T9185] RDX: 00000000010010c0 RSI: 0000000000000000 RDI: 00000000006010e0
[   37.103349][ T9185] RBP: 0000000000000000 R08: 00007f8b188f4740 R09: 0000000000000000
[   37.105797][ T9185] R10: 00007fffc5d32420 R11: 00007f8b183aef40 R12: 0000000000000005
[   37.108228][ T9185] R13: 0000000000000000 R14: ffffffffffffffff R15: 0000000000000000
[   37.110840][ T9185] memory: usage 51200kB, limit 51200kB, failcnt 125
[   37.113045][ T9185] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.115808][ T9185] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.117660][ T9185] Memory cgroup stats for /test1: cache:0KB rss:49484KB rss_huge:30720KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:49700KB inactive_file:0KB active_file:0KB unevictable:0KB
[   37.123371][ T9185] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/test1,task_memcg=/test1,task=a.out,pid=9188,uid=0
[   37.128158][ T9185] Memory cgroup out of memory: Killed process 9188 (a.out) total-vm:14456kB, anon-rss:10324kB, file-rss:504kB, shmem-rss:0kB
[   37.132710][ T9185] Tasks in /test1 are going to be killed due to memory.oom.group set
[   37.132833][   T54] oom_reaper: reaped process 9188 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.135498][ T9185] Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
[   37.143434][ T9185] Memory cgroup out of memory: Killed process 9182 (a.out) total-vm:14456kB, anon-rss:76kB, file-rss:588kB, shmem-rss:0kB
[   37.144328][   T54] oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.147585][ T9185] Memory cgroup out of memory: Killed process 9183 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157222][ T9185] Memory cgroup out of memory: Killed process 9184 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:508kB, shmem-rss:0kB
[   37.157259][ T9185] Memory cgroup out of memory: Killed process 9185 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157291][ T9185] Memory cgroup out of memory: Killed process 9186 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:508kB, shmem-rss:0kB
[   37.157306][   T54] oom_reaper: reaped process 9183 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.157328][ T9185] Memory cgroup out of memory: Killed process 9187 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.157452][ T9185] Memory cgroup out of memory: Killed process 9189 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.158733][ T9185] Memory cgroup out of memory: Killed process 9190 (a.out) total-vm:14456kB, anon-rss:552kB, file-rss:512kB, shmem-rss:0kB
[   37.160083][   T54] oom_reaper: reaped process 9186 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.160187][   T54] oom_reaper: reaped process 9189 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.206941][   T54] oom_reaper: reaped process 9185 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.212300][ T9185] Memory cgroup out of memory: Killed process 9191 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.212317][   T54] oom_reaper: reaped process 9190 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.218860][ T9185] Memory cgroup out of memory: Killed process 9192 (a.out) total-vm:14456kB, anon-rss:1080kB, file-rss:512kB, shmem-rss:0kB
[   37.227667][   T54] oom_reaper: reaped process 9192 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.292323][ T9193] abrt-hook-ccpp (9193) used greatest stack depth: 10480 bytes left
[   37.351843][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b
[   37.354833][    T1] CPU: 7 PID: 1 Comm: systemd Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 torvalds#280
[   37.357876][    T1] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.361685][    T1] Call Trace:
[   37.363239][    T1]  dump_stack+0x67/0x95
[   37.365010][    T1]  panic+0xfc/0x2b0
[   37.366853][    T1]  do_exit+0xd55/0xd60
[   37.368595][    T1]  do_group_exit+0x47/0xc0
[   37.370415][    T1]  get_signal+0x32a/0x920
[   37.372449][    T1]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.374596][    T1]  do_signal+0x32/0x6e0
[   37.376430][    T1]  ? exit_to_usermode_loop+0x26/0x9b
[   37.378418][    T1]  ? prepare_exit_to_usermode+0xa8/0xd0
[   37.380571][    T1]  exit_to_usermode_loop+0x3e/0x9b
[   37.382588][    T1]  prepare_exit_to_usermode+0xa8/0xd0
[   37.384594][    T1]  ? page_fault+0x8/0x30
[   37.386453][    T1]  retint_user+0x8/0x18
[   37.388160][    T1] RIP: 0033:0x7f42c06974a8
[   37.389922][    T1] Code: Bad RIP value.
[   37.391788][    T1] RSP: 002b:00007ffc3effd388 EFLAGS: 00010213
[   37.394075][    T1] RAX: 000000000000000e RBX: 00007ffc3effd390 RCX: 0000000000000000
[   37.396963][    T1] RDX: 000000000000002a RSI: 00007ffc3effd390 RDI: 0000000000000004
[   37.399550][    T1] RBP: 00007ffc3effd680 R08: 0000000000000000 R09: 0000000000000000
[   37.402334][    T1] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[   37.404890][    T1] R13: ffffffffffffffff R14: 0000000000000884 R15: 000056460b1ac3b0

Link: http://lkml.kernel.org/r/201902010336.x113a4EO027170@www262.sakura.ne.jp
Fixes: 3d8b38e ("mm, oom: introduce memory.oom.group")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 6, 2019
Since setting global init process to some memory cgroup is technically
possible, oom_kill_memcg_member() must check it.

  Tasks in /test1 are going to be killed due to memory.oom.group set
  Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
  oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	static char buffer[10485760];
	static int pipe_fd[2] = { EOF, EOF };
	unsigned int i;
	int fd;
	char buf[64] = { };
	if (pipe(pipe_fd))
		return 1;
	if (chdir("/sys/fs/cgroup/"))
		return 1;
	fd = open("cgroup.subtree_control", O_WRONLY);
	write(fd, "+memory", 7);
	close(fd);
	mkdir("test1", 0755);
	fd = open("test1/memory.oom.group", O_WRONLY);
	write(fd, "1", 1);
	close(fd);
	fd = open("test1/cgroup.procs", O_WRONLY);
	write(fd, "1", 1);
	snprintf(buf, sizeof(buf) - 1, "%d", getpid());
	write(fd, buf, strlen(buf));
	close(fd);
	snprintf(buf, sizeof(buf) - 1, "%lu", sizeof(buffer) * 5);
	fd = open("test1/memory.max", O_WRONLY);
	write(fd, buf, strlen(buf));
	close(fd);
	for (i = 0; i < 10; i++)
		if (fork() == 0) {
			char c;
			close(pipe_fd[1]);
			read(pipe_fd[0], &c, 1);
			memset(buffer, 0, sizeof(buffer));
			sleep(3);
			_exit(0);
		}
	close(pipe_fd[0]);
	close(pipe_fd[1]);
	sleep(3);
	return 0;
}

[   37.052923][ T9185] a.out invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[   37.056169][ T9185] CPU: 4 PID: 9185 Comm: a.out Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 torvalds#280
[   37.059205][ T9185] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.062954][ T9185] Call Trace:
[   37.063976][ T9185]  dump_stack+0x67/0x95
[   37.065263][ T9185]  dump_header+0x51/0x570
[   37.066619][ T9185]  ? trace_hardirqs_on+0x3f/0x110
[   37.068171][ T9185]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.069967][ T9185]  oom_kill_process+0x18d/0x210
[   37.071515][ T9185]  out_of_memory+0x11b/0x380
[   37.072936][ T9185]  mem_cgroup_out_of_memory+0xb6/0xd0
[   37.074601][ T9185]  try_charge+0x790/0x820
[   37.076021][ T9185]  mem_cgroup_try_charge+0x42/0x1d0
[   37.077629][ T9185]  mem_cgroup_try_charge_delay+0x11/0x30
[   37.079370][ T9185]  do_anonymous_page+0x105/0x5e0
[   37.080939][ T9185]  __handle_mm_fault+0x9cb/0x1070
[   37.082485][ T9185]  handle_mm_fault+0x1b2/0x3a0
[   37.083819][ T9185]  ? handle_mm_fault+0x47/0x3a0
[   37.085181][ T9185]  __do_page_fault+0x255/0x4c0
[   37.086529][ T9185]  do_page_fault+0x28/0x260
[   37.087788][ T9185]  ? page_fault+0x8/0x30
[   37.088978][ T9185]  page_fault+0x1e/0x30
[   37.090142][ T9185] RIP: 0033:0x7f8b183aefe0
[   37.091433][ T9185] Code: 20 f3 44 0f 7f 44 17 d0 f3 44 0f 7f 47 30 f3 44 0f 7f 44 17 c0 48 01 fa 48 83 e2 c0 48 39 d1 74 a3 66 0f 1f 84 00 00 00 00 00 <66> 44 0f 7f 01 66 44 0f 7f 41 10 66 44 0f 7f 41 20 66 44 0f 7f 41
[   37.096917][ T9185] RSP: 002b:00007fffc5d329e8 EFLAGS: 00010206
[   37.098615][ T9185] RAX: 00000000006010e0 RBX: 0000000000000008 RCX: 0000000000c30000
[   37.100905][ T9185] RDX: 00000000010010c0 RSI: 0000000000000000 RDI: 00000000006010e0
[   37.103349][ T9185] RBP: 0000000000000000 R08: 00007f8b188f4740 R09: 0000000000000000
[   37.105797][ T9185] R10: 00007fffc5d32420 R11: 00007f8b183aef40 R12: 0000000000000005
[   37.108228][ T9185] R13: 0000000000000000 R14: ffffffffffffffff R15: 0000000000000000
[   37.110840][ T9185] memory: usage 51200kB, limit 51200kB, failcnt 125
[   37.113045][ T9185] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.115808][ T9185] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.117660][ T9185] Memory cgroup stats for /test1: cache:0KB rss:49484KB rss_huge:30720KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:49700KB inactive_file:0KB active_file:0KB unevictable:0KB
[   37.123371][ T9185] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/test1,task_memcg=/test1,task=a.out,pid=9188,uid=0
[   37.128158][ T9185] Memory cgroup out of memory: Killed process 9188 (a.out) total-vm:14456kB, anon-rss:10324kB, file-rss:504kB, shmem-rss:0kB
[   37.132710][ T9185] Tasks in /test1 are going to be killed due to memory.oom.group set
[   37.132833][   T54] oom_reaper: reaped process 9188 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.135498][ T9185] Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
[   37.143434][ T9185] Memory cgroup out of memory: Killed process 9182 (a.out) total-vm:14456kB, anon-rss:76kB, file-rss:588kB, shmem-rss:0kB
[   37.144328][   T54] oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.147585][ T9185] Memory cgroup out of memory: Killed process 9183 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157222][ T9185] Memory cgroup out of memory: Killed process 9184 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:508kB, shmem-rss:0kB
[   37.157259][ T9185] Memory cgroup out of memory: Killed process 9185 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157291][ T9185] Memory cgroup out of memory: Killed process 9186 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:508kB, shmem-rss:0kB
[   37.157306][   T54] oom_reaper: reaped process 9183 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.157328][ T9185] Memory cgroup out of memory: Killed process 9187 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.157452][ T9185] Memory cgroup out of memory: Killed process 9189 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.158733][ T9185] Memory cgroup out of memory: Killed process 9190 (a.out) total-vm:14456kB, anon-rss:552kB, file-rss:512kB, shmem-rss:0kB
[   37.160083][   T54] oom_reaper: reaped process 9186 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.160187][   T54] oom_reaper: reaped process 9189 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.206941][   T54] oom_reaper: reaped process 9185 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.212300][ T9185] Memory cgroup out of memory: Killed process 9191 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.212317][   T54] oom_reaper: reaped process 9190 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.218860][ T9185] Memory cgroup out of memory: Killed process 9192 (a.out) total-vm:14456kB, anon-rss:1080kB, file-rss:512kB, shmem-rss:0kB
[   37.227667][   T54] oom_reaper: reaped process 9192 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.292323][ T9193] abrt-hook-ccpp (9193) used greatest stack depth: 10480 bytes left
[   37.351843][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b
[   37.354833][    T1] CPU: 7 PID: 1 Comm: systemd Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 torvalds#280
[   37.357876][    T1] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.361685][    T1] Call Trace:
[   37.363239][    T1]  dump_stack+0x67/0x95
[   37.365010][    T1]  panic+0xfc/0x2b0
[   37.366853][    T1]  do_exit+0xd55/0xd60
[   37.368595][    T1]  do_group_exit+0x47/0xc0
[   37.370415][    T1]  get_signal+0x32a/0x920
[   37.372449][    T1]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.374596][    T1]  do_signal+0x32/0x6e0
[   37.376430][    T1]  ? exit_to_usermode_loop+0x26/0x9b
[   37.378418][    T1]  ? prepare_exit_to_usermode+0xa8/0xd0
[   37.380571][    T1]  exit_to_usermode_loop+0x3e/0x9b
[   37.382588][    T1]  prepare_exit_to_usermode+0xa8/0xd0
[   37.384594][    T1]  ? page_fault+0x8/0x30
[   37.386453][    T1]  retint_user+0x8/0x18
[   37.388160][    T1] RIP: 0033:0x7f42c06974a8
[   37.389922][    T1] Code: Bad RIP value.
[   37.391788][    T1] RSP: 002b:00007ffc3effd388 EFLAGS: 00010213
[   37.394075][    T1] RAX: 000000000000000e RBX: 00007ffc3effd390 RCX: 0000000000000000
[   37.396963][    T1] RDX: 000000000000002a RSI: 00007ffc3effd390 RDI: 0000000000000004
[   37.399550][    T1] RBP: 00007ffc3effd680 R08: 0000000000000000 R09: 0000000000000000
[   37.402334][    T1] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[   37.404890][    T1] R13: ffffffffffffffff R14: 0000000000000884 R15: 000056460b1ac3b0

Link: http://lkml.kernel.org/r/201902010336.x113a4EO027170@www262.sakura.ne.jp
Fixes: 3d8b38e ("mm, oom: introduce memory.oom.group")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
damentz referenced this pull request in zen-kernel/zen-kernel Apr 6, 2019
[ Upstream commit d342a0b ]

Since setting global init process to some memory cgroup is technically
possible, oom_kill_memcg_member() must check it.

  Tasks in /test1 are going to be killed due to memory.oom.group set
  Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
  oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	static char buffer[10485760];
	static int pipe_fd[2] = { EOF, EOF };
	unsigned int i;
	int fd;
	char buf[64] = { };
	if (pipe(pipe_fd))
		return 1;
	if (chdir("/sys/fs/cgroup/"))
		return 1;
	fd = open("cgroup.subtree_control", O_WRONLY);
	write(fd, "+memory", 7);
	close(fd);
	mkdir("test1", 0755);
	fd = open("test1/memory.oom.group", O_WRONLY);
	write(fd, "1", 1);
	close(fd);
	fd = open("test1/cgroup.procs", O_WRONLY);
	write(fd, "1", 1);
	snprintf(buf, sizeof(buf) - 1, "%d", getpid());
	write(fd, buf, strlen(buf));
	close(fd);
	snprintf(buf, sizeof(buf) - 1, "%lu", sizeof(buffer) * 5);
	fd = open("test1/memory.max", O_WRONLY);
	write(fd, buf, strlen(buf));
	close(fd);
	for (i = 0; i < 10; i++)
		if (fork() == 0) {
			char c;
			close(pipe_fd[1]);
			read(pipe_fd[0], &c, 1);
			memset(buffer, 0, sizeof(buffer));
			sleep(3);
			_exit(0);
		}
	close(pipe_fd[0]);
	close(pipe_fd[1]);
	sleep(3);
	return 0;
}

[   37.052923][ T9185] a.out invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[   37.056169][ T9185] CPU: 4 PID: 9185 Comm: a.out Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.059205][ T9185] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.062954][ T9185] Call Trace:
[   37.063976][ T9185]  dump_stack+0x67/0x95
[   37.065263][ T9185]  dump_header+0x51/0x570
[   37.066619][ T9185]  ? trace_hardirqs_on+0x3f/0x110
[   37.068171][ T9185]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.069967][ T9185]  oom_kill_process+0x18d/0x210
[   37.071515][ T9185]  out_of_memory+0x11b/0x380
[   37.072936][ T9185]  mem_cgroup_out_of_memory+0xb6/0xd0
[   37.074601][ T9185]  try_charge+0x790/0x820
[   37.076021][ T9185]  mem_cgroup_try_charge+0x42/0x1d0
[   37.077629][ T9185]  mem_cgroup_try_charge_delay+0x11/0x30
[   37.079370][ T9185]  do_anonymous_page+0x105/0x5e0
[   37.080939][ T9185]  __handle_mm_fault+0x9cb/0x1070
[   37.082485][ T9185]  handle_mm_fault+0x1b2/0x3a0
[   37.083819][ T9185]  ? handle_mm_fault+0x47/0x3a0
[   37.085181][ T9185]  __do_page_fault+0x255/0x4c0
[   37.086529][ T9185]  do_page_fault+0x28/0x260
[   37.087788][ T9185]  ? page_fault+0x8/0x30
[   37.088978][ T9185]  page_fault+0x1e/0x30
[   37.090142][ T9185] RIP: 0033:0x7f8b183aefe0
[   37.091433][ T9185] Code: 20 f3 44 0f 7f 44 17 d0 f3 44 0f 7f 47 30 f3 44 0f 7f 44 17 c0 48 01 fa 48 83 e2 c0 48 39 d1 74 a3 66 0f 1f 84 00 00 00 00 00 <66> 44 0f 7f 01 66 44 0f 7f 41 10 66 44 0f 7f 41 20 66 44 0f 7f 41
[   37.096917][ T9185] RSP: 002b:00007fffc5d329e8 EFLAGS: 00010206
[   37.098615][ T9185] RAX: 00000000006010e0 RBX: 0000000000000008 RCX: 0000000000c30000
[   37.100905][ T9185] RDX: 00000000010010c0 RSI: 0000000000000000 RDI: 00000000006010e0
[   37.103349][ T9185] RBP: 0000000000000000 R08: 00007f8b188f4740 R09: 0000000000000000
[   37.105797][ T9185] R10: 00007fffc5d32420 R11: 00007f8b183aef40 R12: 0000000000000005
[   37.108228][ T9185] R13: 0000000000000000 R14: ffffffffffffffff R15: 0000000000000000
[   37.110840][ T9185] memory: usage 51200kB, limit 51200kB, failcnt 125
[   37.113045][ T9185] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.115808][ T9185] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.117660][ T9185] Memory cgroup stats for /test1: cache:0KB rss:49484KB rss_huge:30720KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:49700KB inactive_file:0KB active_file:0KB unevictable:0KB
[   37.123371][ T9185] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/test1,task_memcg=/test1,task=a.out,pid=9188,uid=0
[   37.128158][ T9185] Memory cgroup out of memory: Killed process 9188 (a.out) total-vm:14456kB, anon-rss:10324kB, file-rss:504kB, shmem-rss:0kB
[   37.132710][ T9185] Tasks in /test1 are going to be killed due to memory.oom.group set
[   37.132833][   T54] oom_reaper: reaped process 9188 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.135498][ T9185] Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
[   37.143434][ T9185] Memory cgroup out of memory: Killed process 9182 (a.out) total-vm:14456kB, anon-rss:76kB, file-rss:588kB, shmem-rss:0kB
[   37.144328][   T54] oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.147585][ T9185] Memory cgroup out of memory: Killed process 9183 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157222][ T9185] Memory cgroup out of memory: Killed process 9184 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:508kB, shmem-rss:0kB
[   37.157259][ T9185] Memory cgroup out of memory: Killed process 9185 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157291][ T9185] Memory cgroup out of memory: Killed process 9186 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:508kB, shmem-rss:0kB
[   37.157306][   T54] oom_reaper: reaped process 9183 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.157328][ T9185] Memory cgroup out of memory: Killed process 9187 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.157452][ T9185] Memory cgroup out of memory: Killed process 9189 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.158733][ T9185] Memory cgroup out of memory: Killed process 9190 (a.out) total-vm:14456kB, anon-rss:552kB, file-rss:512kB, shmem-rss:0kB
[   37.160083][   T54] oom_reaper: reaped process 9186 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.160187][   T54] oom_reaper: reaped process 9189 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.206941][   T54] oom_reaper: reaped process 9185 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.212300][ T9185] Memory cgroup out of memory: Killed process 9191 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.212317][   T54] oom_reaper: reaped process 9190 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.218860][ T9185] Memory cgroup out of memory: Killed process 9192 (a.out) total-vm:14456kB, anon-rss:1080kB, file-rss:512kB, shmem-rss:0kB
[   37.227667][   T54] oom_reaper: reaped process 9192 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.292323][ T9193] abrt-hook-ccpp (9193) used greatest stack depth: 10480 bytes left
[   37.351843][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b
[   37.354833][    T1] CPU: 7 PID: 1 Comm: systemd Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.357876][    T1] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.361685][    T1] Call Trace:
[   37.363239][    T1]  dump_stack+0x67/0x95
[   37.365010][    T1]  panic+0xfc/0x2b0
[   37.366853][    T1]  do_exit+0xd55/0xd60
[   37.368595][    T1]  do_group_exit+0x47/0xc0
[   37.370415][    T1]  get_signal+0x32a/0x920
[   37.372449][    T1]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.374596][    T1]  do_signal+0x32/0x6e0
[   37.376430][    T1]  ? exit_to_usermode_loop+0x26/0x9b
[   37.378418][    T1]  ? prepare_exit_to_usermode+0xa8/0xd0
[   37.380571][    T1]  exit_to_usermode_loop+0x3e/0x9b
[   37.382588][    T1]  prepare_exit_to_usermode+0xa8/0xd0
[   37.384594][    T1]  ? page_fault+0x8/0x30
[   37.386453][    T1]  retint_user+0x8/0x18
[   37.388160][    T1] RIP: 0033:0x7f42c06974a8
[   37.389922][    T1] Code: Bad RIP value.
[   37.391788][    T1] RSP: 002b:00007ffc3effd388 EFLAGS: 00010213
[   37.394075][    T1] RAX: 000000000000000e RBX: 00007ffc3effd390 RCX: 0000000000000000
[   37.396963][    T1] RDX: 000000000000002a RSI: 00007ffc3effd390 RDI: 0000000000000004
[   37.399550][    T1] RBP: 00007ffc3effd680 R08: 0000000000000000 R09: 0000000000000000
[   37.402334][    T1] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[   37.404890][    T1] R13: ffffffffffffffff R14: 0000000000000884 R15: 000056460b1ac3b0

Link: http://lkml.kernel.org/r/201902010336.x113a4EO027170@www262.sakura.ne.jp
Fixes: 3d8b38e ("mm, oom: introduce memory.oom.group")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
damentz referenced this pull request in zen-kernel/zen-kernel Apr 6, 2019
[ Upstream commit d342a0b ]

Since setting global init process to some memory cgroup is technically
possible, oom_kill_memcg_member() must check it.

  Tasks in /test1 are going to be killed due to memory.oom.group set
  Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
  oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	static char buffer[10485760];
	static int pipe_fd[2] = { EOF, EOF };
	unsigned int i;
	int fd;
	char buf[64] = { };
	if (pipe(pipe_fd))
		return 1;
	if (chdir("/sys/fs/cgroup/"))
		return 1;
	fd = open("cgroup.subtree_control", O_WRONLY);
	write(fd, "+memory", 7);
	close(fd);
	mkdir("test1", 0755);
	fd = open("test1/memory.oom.group", O_WRONLY);
	write(fd, "1", 1);
	close(fd);
	fd = open("test1/cgroup.procs", O_WRONLY);
	write(fd, "1", 1);
	snprintf(buf, sizeof(buf) - 1, "%d", getpid());
	write(fd, buf, strlen(buf));
	close(fd);
	snprintf(buf, sizeof(buf) - 1, "%lu", sizeof(buffer) * 5);
	fd = open("test1/memory.max", O_WRONLY);
	write(fd, buf, strlen(buf));
	close(fd);
	for (i = 0; i < 10; i++)
		if (fork() == 0) {
			char c;
			close(pipe_fd[1]);
			read(pipe_fd[0], &c, 1);
			memset(buffer, 0, sizeof(buffer));
			sleep(3);
			_exit(0);
		}
	close(pipe_fd[0]);
	close(pipe_fd[1]);
	sleep(3);
	return 0;
}

[   37.052923][ T9185] a.out invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[   37.056169][ T9185] CPU: 4 PID: 9185 Comm: a.out Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.059205][ T9185] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.062954][ T9185] Call Trace:
[   37.063976][ T9185]  dump_stack+0x67/0x95
[   37.065263][ T9185]  dump_header+0x51/0x570
[   37.066619][ T9185]  ? trace_hardirqs_on+0x3f/0x110
[   37.068171][ T9185]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.069967][ T9185]  oom_kill_process+0x18d/0x210
[   37.071515][ T9185]  out_of_memory+0x11b/0x380
[   37.072936][ T9185]  mem_cgroup_out_of_memory+0xb6/0xd0
[   37.074601][ T9185]  try_charge+0x790/0x820
[   37.076021][ T9185]  mem_cgroup_try_charge+0x42/0x1d0
[   37.077629][ T9185]  mem_cgroup_try_charge_delay+0x11/0x30
[   37.079370][ T9185]  do_anonymous_page+0x105/0x5e0
[   37.080939][ T9185]  __handle_mm_fault+0x9cb/0x1070
[   37.082485][ T9185]  handle_mm_fault+0x1b2/0x3a0
[   37.083819][ T9185]  ? handle_mm_fault+0x47/0x3a0
[   37.085181][ T9185]  __do_page_fault+0x255/0x4c0
[   37.086529][ T9185]  do_page_fault+0x28/0x260
[   37.087788][ T9185]  ? page_fault+0x8/0x30
[   37.088978][ T9185]  page_fault+0x1e/0x30
[   37.090142][ T9185] RIP: 0033:0x7f8b183aefe0
[   37.091433][ T9185] Code: 20 f3 44 0f 7f 44 17 d0 f3 44 0f 7f 47 30 f3 44 0f 7f 44 17 c0 48 01 fa 48 83 e2 c0 48 39 d1 74 a3 66 0f 1f 84 00 00 00 00 00 <66> 44 0f 7f 01 66 44 0f 7f 41 10 66 44 0f 7f 41 20 66 44 0f 7f 41
[   37.096917][ T9185] RSP: 002b:00007fffc5d329e8 EFLAGS: 00010206
[   37.098615][ T9185] RAX: 00000000006010e0 RBX: 0000000000000008 RCX: 0000000000c30000
[   37.100905][ T9185] RDX: 00000000010010c0 RSI: 0000000000000000 RDI: 00000000006010e0
[   37.103349][ T9185] RBP: 0000000000000000 R08: 00007f8b188f4740 R09: 0000000000000000
[   37.105797][ T9185] R10: 00007fffc5d32420 R11: 00007f8b183aef40 R12: 0000000000000005
[   37.108228][ T9185] R13: 0000000000000000 R14: ffffffffffffffff R15: 0000000000000000
[   37.110840][ T9185] memory: usage 51200kB, limit 51200kB, failcnt 125
[   37.113045][ T9185] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.115808][ T9185] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.117660][ T9185] Memory cgroup stats for /test1: cache:0KB rss:49484KB rss_huge:30720KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:49700KB inactive_file:0KB active_file:0KB unevictable:0KB
[   37.123371][ T9185] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/test1,task_memcg=/test1,task=a.out,pid=9188,uid=0
[   37.128158][ T9185] Memory cgroup out of memory: Killed process 9188 (a.out) total-vm:14456kB, anon-rss:10324kB, file-rss:504kB, shmem-rss:0kB
[   37.132710][ T9185] Tasks in /test1 are going to be killed due to memory.oom.group set
[   37.132833][   T54] oom_reaper: reaped process 9188 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.135498][ T9185] Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
[   37.143434][ T9185] Memory cgroup out of memory: Killed process 9182 (a.out) total-vm:14456kB, anon-rss:76kB, file-rss:588kB, shmem-rss:0kB
[   37.144328][   T54] oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.147585][ T9185] Memory cgroup out of memory: Killed process 9183 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157222][ T9185] Memory cgroup out of memory: Killed process 9184 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:508kB, shmem-rss:0kB
[   37.157259][ T9185] Memory cgroup out of memory: Killed process 9185 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157291][ T9185] Memory cgroup out of memory: Killed process 9186 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:508kB, shmem-rss:0kB
[   37.157306][   T54] oom_reaper: reaped process 9183 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.157328][ T9185] Memory cgroup out of memory: Killed process 9187 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.157452][ T9185] Memory cgroup out of memory: Killed process 9189 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.158733][ T9185] Memory cgroup out of memory: Killed process 9190 (a.out) total-vm:14456kB, anon-rss:552kB, file-rss:512kB, shmem-rss:0kB
[   37.160083][   T54] oom_reaper: reaped process 9186 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.160187][   T54] oom_reaper: reaped process 9189 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.206941][   T54] oom_reaper: reaped process 9185 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.212300][ T9185] Memory cgroup out of memory: Killed process 9191 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.212317][   T54] oom_reaper: reaped process 9190 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.218860][ T9185] Memory cgroup out of memory: Killed process 9192 (a.out) total-vm:14456kB, anon-rss:1080kB, file-rss:512kB, shmem-rss:0kB
[   37.227667][   T54] oom_reaper: reaped process 9192 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.292323][ T9193] abrt-hook-ccpp (9193) used greatest stack depth: 10480 bytes left
[   37.351843][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b
[   37.354833][    T1] CPU: 7 PID: 1 Comm: systemd Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.357876][    T1] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.361685][    T1] Call Trace:
[   37.363239][    T1]  dump_stack+0x67/0x95
[   37.365010][    T1]  panic+0xfc/0x2b0
[   37.366853][    T1]  do_exit+0xd55/0xd60
[   37.368595][    T1]  do_group_exit+0x47/0xc0
[   37.370415][    T1]  get_signal+0x32a/0x920
[   37.372449][    T1]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.374596][    T1]  do_signal+0x32/0x6e0
[   37.376430][    T1]  ? exit_to_usermode_loop+0x26/0x9b
[   37.378418][    T1]  ? prepare_exit_to_usermode+0xa8/0xd0
[   37.380571][    T1]  exit_to_usermode_loop+0x3e/0x9b
[   37.382588][    T1]  prepare_exit_to_usermode+0xa8/0xd0
[   37.384594][    T1]  ? page_fault+0x8/0x30
[   37.386453][    T1]  retint_user+0x8/0x18
[   37.388160][    T1] RIP: 0033:0x7f42c06974a8
[   37.389922][    T1] Code: Bad RIP value.
[   37.391788][    T1] RSP: 002b:00007ffc3effd388 EFLAGS: 00010213
[   37.394075][    T1] RAX: 000000000000000e RBX: 00007ffc3effd390 RCX: 0000000000000000
[   37.396963][    T1] RDX: 000000000000002a RSI: 00007ffc3effd390 RDI: 0000000000000004
[   37.399550][    T1] RBP: 00007ffc3effd680 R08: 0000000000000000 R09: 0000000000000000
[   37.402334][    T1] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[   37.404890][    T1] R13: ffffffffffffffff R14: 0000000000000884 R15: 000056460b1ac3b0

Link: http://lkml.kernel.org/r/201902010336.x113a4EO027170@www262.sakura.ne.jp
Fixes: 3d8b38e ("mm, oom: introduce memory.oom.group")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
jackpot51 referenced this pull request in pop-os/linux Jun 21, 2019
BugLink: https://bugs.launchpad.net/bugs/1828410

[ Upstream commit d342a0b ]

Since setting global init process to some memory cgroup is technically
possible, oom_kill_memcg_member() must check it.

  Tasks in /test1 are going to be killed due to memory.oom.group set
  Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
  oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	static char buffer[10485760];
	static int pipe_fd[2] = { EOF, EOF };
	unsigned int i;
	int fd;
	char buf[64] = { };
	if (pipe(pipe_fd))
		return 1;
	if (chdir("/sys/fs/cgroup/"))
		return 1;
	fd = open("cgroup.subtree_control", O_WRONLY);
	write(fd, "+memory", 7);
	close(fd);
	mkdir("test1", 0755);
	fd = open("test1/memory.oom.group", O_WRONLY);
	write(fd, "1", 1);
	close(fd);
	fd = open("test1/cgroup.procs", O_WRONLY);
	write(fd, "1", 1);
	snprintf(buf, sizeof(buf) - 1, "%d", getpid());
	write(fd, buf, strlen(buf));
	close(fd);
	snprintf(buf, sizeof(buf) - 1, "%lu", sizeof(buffer) * 5);
	fd = open("test1/memory.max", O_WRONLY);
	write(fd, buf, strlen(buf));
	close(fd);
	for (i = 0; i < 10; i++)
		if (fork() == 0) {
			char c;
			close(pipe_fd[1]);
			read(pipe_fd[0], &c, 1);
			memset(buffer, 0, sizeof(buffer));
			sleep(3);
			_exit(0);
		}
	close(pipe_fd[0]);
	close(pipe_fd[1]);
	sleep(3);
	return 0;
}

[   37.052923][ T9185] a.out invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[   37.056169][ T9185] CPU: 4 PID: 9185 Comm: a.out Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.059205][ T9185] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.062954][ T9185] Call Trace:
[   37.063976][ T9185]  dump_stack+0x67/0x95
[   37.065263][ T9185]  dump_header+0x51/0x570
[   37.066619][ T9185]  ? trace_hardirqs_on+0x3f/0x110
[   37.068171][ T9185]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.069967][ T9185]  oom_kill_process+0x18d/0x210
[   37.071515][ T9185]  out_of_memory+0x11b/0x380
[   37.072936][ T9185]  mem_cgroup_out_of_memory+0xb6/0xd0
[   37.074601][ T9185]  try_charge+0x790/0x820
[   37.076021][ T9185]  mem_cgroup_try_charge+0x42/0x1d0
[   37.077629][ T9185]  mem_cgroup_try_charge_delay+0x11/0x30
[   37.079370][ T9185]  do_anonymous_page+0x105/0x5e0
[   37.080939][ T9185]  __handle_mm_fault+0x9cb/0x1070
[   37.082485][ T9185]  handle_mm_fault+0x1b2/0x3a0
[   37.083819][ T9185]  ? handle_mm_fault+0x47/0x3a0
[   37.085181][ T9185]  __do_page_fault+0x255/0x4c0
[   37.086529][ T9185]  do_page_fault+0x28/0x260
[   37.087788][ T9185]  ? page_fault+0x8/0x30
[   37.088978][ T9185]  page_fault+0x1e/0x30
[   37.090142][ T9185] RIP: 0033:0x7f8b183aefe0
[   37.091433][ T9185] Code: 20 f3 44 0f 7f 44 17 d0 f3 44 0f 7f 47 30 f3 44 0f 7f 44 17 c0 48 01 fa 48 83 e2 c0 48 39 d1 74 a3 66 0f 1f 84 00 00 00 00 00 <66> 44 0f 7f 01 66 44 0f 7f 41 10 66 44 0f 7f 41 20 66 44 0f 7f 41
[   37.096917][ T9185] RSP: 002b:00007fffc5d329e8 EFLAGS: 00010206
[   37.098615][ T9185] RAX: 00000000006010e0 RBX: 0000000000000008 RCX: 0000000000c30000
[   37.100905][ T9185] RDX: 00000000010010c0 RSI: 0000000000000000 RDI: 00000000006010e0
[   37.103349][ T9185] RBP: 0000000000000000 R08: 00007f8b188f4740 R09: 0000000000000000
[   37.105797][ T9185] R10: 00007fffc5d32420 R11: 00007f8b183aef40 R12: 0000000000000005
[   37.108228][ T9185] R13: 0000000000000000 R14: ffffffffffffffff R15: 0000000000000000
[   37.110840][ T9185] memory: usage 51200kB, limit 51200kB, failcnt 125
[   37.113045][ T9185] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.115808][ T9185] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
[   37.117660][ T9185] Memory cgroup stats for /test1: cache:0KB rss:49484KB rss_huge:30720KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:49700KB inactive_file:0KB active_file:0KB unevictable:0KB
[   37.123371][ T9185] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/test1,task_memcg=/test1,task=a.out,pid=9188,uid=0
[   37.128158][ T9185] Memory cgroup out of memory: Killed process 9188 (a.out) total-vm:14456kB, anon-rss:10324kB, file-rss:504kB, shmem-rss:0kB
[   37.132710][ T9185] Tasks in /test1 are going to be killed due to memory.oom.group set
[   37.132833][   T54] oom_reaper: reaped process 9188 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.135498][ T9185] Memory cgroup out of memory: Killed process 1 (systemd) total-vm:43400kB, anon-rss:1228kB, file-rss:3992kB, shmem-rss:0kB
[   37.143434][ T9185] Memory cgroup out of memory: Killed process 9182 (a.out) total-vm:14456kB, anon-rss:76kB, file-rss:588kB, shmem-rss:0kB
[   37.144328][   T54] oom_reaper: reaped process 1 (systemd), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.147585][ T9185] Memory cgroup out of memory: Killed process 9183 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157222][ T9185] Memory cgroup out of memory: Killed process 9184 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:508kB, shmem-rss:0kB
[   37.157259][ T9185] Memory cgroup out of memory: Killed process 9185 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.157291][ T9185] Memory cgroup out of memory: Killed process 9186 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:508kB, shmem-rss:0kB
[   37.157306][   T54] oom_reaper: reaped process 9183 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.157328][ T9185] Memory cgroup out of memory: Killed process 9187 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.157452][ T9185] Memory cgroup out of memory: Killed process 9189 (a.out) total-vm:14456kB, anon-rss:6228kB, file-rss:512kB, shmem-rss:0kB
[   37.158733][ T9185] Memory cgroup out of memory: Killed process 9190 (a.out) total-vm:14456kB, anon-rss:552kB, file-rss:512kB, shmem-rss:0kB
[   37.160083][   T54] oom_reaper: reaped process 9186 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.160187][   T54] oom_reaper: reaped process 9189 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.206941][   T54] oom_reaper: reaped process 9185 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.212300][ T9185] Memory cgroup out of memory: Killed process 9191 (a.out) total-vm:14456kB, anon-rss:4180kB, file-rss:512kB, shmem-rss:0kB
[   37.212317][   T54] oom_reaper: reaped process 9190 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.218860][ T9185] Memory cgroup out of memory: Killed process 9192 (a.out) total-vm:14456kB, anon-rss:1080kB, file-rss:512kB, shmem-rss:0kB
[   37.227667][   T54] oom_reaper: reaped process 9192 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[   37.292323][ T9193] abrt-hook-ccpp (9193) used greatest stack depth: 10480 bytes left
[   37.351843][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000008b
[   37.354833][    T1] CPU: 7 PID: 1 Comm: systemd Kdump: loaded Not tainted 5.0.0-rc4-next-20190131 #280
[   37.357876][    T1] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[   37.361685][    T1] Call Trace:
[   37.363239][    T1]  dump_stack+0x67/0x95
[   37.365010][    T1]  panic+0xfc/0x2b0
[   37.366853][    T1]  do_exit+0xd55/0xd60
[   37.368595][    T1]  do_group_exit+0x47/0xc0
[   37.370415][    T1]  get_signal+0x32a/0x920
[   37.372449][    T1]  ? _raw_spin_unlock_irqrestore+0x3d/0x70
[   37.374596][    T1]  do_signal+0x32/0x6e0
[   37.376430][    T1]  ? exit_to_usermode_loop+0x26/0x9b
[   37.378418][    T1]  ? prepare_exit_to_usermode+0xa8/0xd0
[   37.380571][    T1]  exit_to_usermode_loop+0x3e/0x9b
[   37.382588][    T1]  prepare_exit_to_usermode+0xa8/0xd0
[   37.384594][    T1]  ? page_fault+0x8/0x30
[   37.386453][    T1]  retint_user+0x8/0x18
[   37.388160][    T1] RIP: 0033:0x7f42c06974a8
[   37.389922][    T1] Code: Bad RIP value.
[   37.391788][    T1] RSP: 002b:00007ffc3effd388 EFLAGS: 00010213
[   37.394075][    T1] RAX: 000000000000000e RBX: 00007ffc3effd390 RCX: 0000000000000000
[   37.396963][    T1] RDX: 000000000000002a RSI: 00007ffc3effd390 RDI: 0000000000000004
[   37.399550][    T1] RBP: 00007ffc3effd680 R08: 0000000000000000 R09: 0000000000000000
[   37.402334][    T1] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[   37.404890][    T1] R13: ffffffffffffffff R14: 0000000000000884 R15: 000056460b1ac3b0

Link: http://lkml.kernel.org/r/201902010336.x113a4EO027170@www262.sakura.ne.jp
Fixes: 3d8b38e ("mm, oom: introduce memory.oom.group")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 12, 2021
This commit fixes the following checkpatch.pl warnings:

    WARNING: do not add new typedefs
    torvalds#95: FILE: hal/odm.h:95:
    +typedef struct _Rate_Adaptive_Table_ {

    WARNING: do not add new typedefs
    torvalds#99: FILE: hal/odm.h:99:
    +typedef struct _RX_High_Power_ {

    WARNING: do not add new typedefs
    torvalds#129: FILE: hal/odm.h:129:
    +typedef struct _SW_Antenna_Switch_ {

    WARNING: do not add new typedefs
    torvalds#181: FILE: hal/odm.h:181:
    +typedef struct _ODM_RATE_ADAPTIVE {

    WARNING: do not add new typedefs
    torvalds#280: FILE: hal/odm.h:280:
    +typedef enum tag_Dynamic_ODM_Support_Ability_Type {

    WARNING: do not add new typedefs
    torvalds#300: FILE: hal/odm.h:300:
    +typedef struct _ODM_STA_INFO {

    WARNING: do not add new typedefs
    torvalds#328: FILE: hal/odm.h:328:
    +typedef enum _ODM_Common_Info_Definition {

    WARNING: do not add new typedefs
    torvalds#418: FILE: hal/odm.h:418:
    +typedef enum _ODM_Support_Ability_Definition {

    WARNING: do not add new typedefs
    torvalds#449: FILE: hal/odm.h:449:
    +typedef enum tag_ODM_Support_Interface_Definition {

    WARNING: do not add new typedefs
    torvalds#455: FILE: hal/odm.h:455:
    +typedef enum tag_ODM_Support_IC_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#460: FILE: hal/odm.h:460:
    +typedef enum tag_ODM_Cut_Version_Definition {

    WARNING: do not add new typedefs
    torvalds#475: FILE: hal/odm.h:475:
    +typedef enum tag_ODM_Fab_Version_Definition {

    WARNING: do not add new typedefs
    torvalds#484: FILE: hal/odm.h:484:
    +typedef enum tag_ODM_RF_Path_Bit_Definition {

    WARNING: do not add new typedefs
    torvalds#495: FILE: hal/odm.h:495:
    +typedef enum tag_ODM_RF_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#516: FILE: hal/odm.h:516:
    +typedef enum tag_ODM_MAC_PHY_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#522: FILE: hal/odm.h:522:
    +typedef enum tag_BT_Coexist_Definition {

    WARNING: do not add new typedefs
    torvalds#530: FILE: hal/odm.h:530:
    +typedef enum tag_Operation_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#543: FILE: hal/odm.h:543:
    +typedef enum tag_Wireless_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#555: FILE: hal/odm.h:555:
    +typedef enum tag_Band_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#563: FILE: hal/odm.h:563:
    +typedef enum tag_Secondary_Channel_Offset_Definition {

    WARNING: do not add new typedefs
    torvalds#570: FILE: hal/odm.h:570:
    +typedef enum tag_Security_Definition {

    WARNING: do not add new typedefs
    torvalds#582: FILE: hal/odm.h:582:
    +typedef enum tag_Bandwidth_Definition {

    WARNING: do not add new typedefs
    torvalds#593: FILE: hal/odm.h:593:
    +typedef enum tag_Board_Definition {

    WARNING: do not add new typedefs
    torvalds#605: FILE: hal/odm.h:605:
    +typedef enum tag_ODM_Package_Definition {

    WARNING: do not add new typedefs
    torvalds#612: FILE: hal/odm.h:612:
    +typedef enum tag_ODM_TYPE_GPA_Definition {

    WARNING: do not add new typedefs
    torvalds#617: FILE: hal/odm.h:617:
    +typedef enum tag_ODM_TYPE_APA_Definition {

    WARNING: do not add new typedefs
    torvalds#622: FILE: hal/odm.h:622:
    +typedef enum tag_ODM_TYPE_GLNA_Definition {

    WARNING: do not add new typedefs
    torvalds#629: FILE: hal/odm.h:629:
    +typedef enum tag_ODM_TYPE_ALNA_Definition {

    WARNING: do not add new typedefs
    torvalds#637: FILE: hal/odm.h:637:
    +typedef enum tag_CCA_Path {

    WARNING: do not add new typedefs
    torvalds#643: FILE: hal/odm.h:643:
    +typedef struct _ODM_RA_Info_ {

    WARNING: do not add new typedefs
    torvalds#675: FILE: hal/odm.h:675:
    +typedef struct _IQK_MATRIX_REGS_SETTING {

    WARNING: do not add new typedefs
    torvalds#683: FILE: hal/odm.h:683:
    +typedef struct ODM_RF_Calibration_Structure {

    WARNING: do not add new typedefs
    #788: FILE: hal/odm.h:788:
    +typedef struct _FAST_ANTENNA_TRAINNING_ {

    WARNING: do not add new typedefs
    torvalds#828: FILE: hal/odm.h:828:
    +typedef enum _FAT_STATE {

    WARNING: do not add new typedefs
    torvalds#833: FILE: hal/odm.h:833:
    +typedef enum _ANT_DIV_TYPE {

    WARNING: do not add new typedefs
    torvalds#843: FILE: hal/odm.h:843:
    +typedef struct _ODM_PATH_DIVERSITY_ {

    WARNING: do not add new typedefs
    torvalds#852: FILE: hal/odm.h:852:
    +typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE {

    WARNING: do not add new typedefs
    torvalds#860: FILE: hal/odm.h:860:
    +typedef struct _ANT_DETECTED_INFO {

    WARNING: do not add new typedefs
    torvalds#870: FILE: hal/odm.h:870:
    +typedef  struct DM_Out_Source_Dynamic_Mechanism_Structure {

    WARNING: do not add new typedefs
    #1229: FILE: hal/odm.h:1229:
    + typedef enum _ODM_RF_CONTENT {

    WARNING: do not add new typedefs
    #1236: FILE: hal/odm.h:1236:
    +typedef enum _ODM_BB_Config_Type {

    WARNING: do not add new typedefs
    #1246: FILE: hal/odm.h:1246:
    +typedef enum _ODM_RF_Config_Type {

    WARNING: do not add new typedefs
    #1251: FILE: hal/odm.h:1251:
    +typedef enum _ODM_FW_Config_Type {

    WARNING: do not add new typedefs
    #1262: FILE: hal/odm.h:1262:
    +typedef enum _RT_STATUS {

    WARNING: do not add new typedefs
    #1319: FILE: hal/odm.h:1319:
    +typedef enum tag_1R_CCA_Type_Definition {

    WARNING: do not add new typedefs
    #1325: FILE: hal/odm.h:1325:
    +typedef enum tag_RF_Type_Definition {

    WARNING: do not add new typedefs
    #1334: FILE: hal/odm.h:1334:
    +typedef enum tag_SW_Antenna_Switch_Definition {

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 13, 2021
This commit fixes the following checkpatch.pl warnings:

    WARNING: do not add new typedefs
    torvalds#95: FILE: hal/odm.h:95:
    +typedef struct _Rate_Adaptive_Table_ {

    WARNING: do not add new typedefs
    torvalds#99: FILE: hal/odm.h:99:
    +typedef struct _RX_High_Power_ {

    WARNING: do not add new typedefs
    torvalds#129: FILE: hal/odm.h:129:
    +typedef struct _SW_Antenna_Switch_ {

    WARNING: do not add new typedefs
    torvalds#181: FILE: hal/odm.h:181:
    +typedef struct _ODM_RATE_ADAPTIVE {

    WARNING: do not add new typedefs
    torvalds#280: FILE: hal/odm.h:280:
    +typedef enum tag_Dynamic_ODM_Support_Ability_Type {

    WARNING: do not add new typedefs
    torvalds#300: FILE: hal/odm.h:300:
    +typedef struct _ODM_STA_INFO {

    WARNING: do not add new typedefs
    torvalds#328: FILE: hal/odm.h:328:
    +typedef enum _ODM_Common_Info_Definition {

    WARNING: do not add new typedefs
    torvalds#418: FILE: hal/odm.h:418:
    +typedef enum _ODM_Support_Ability_Definition {

    WARNING: do not add new typedefs
    torvalds#449: FILE: hal/odm.h:449:
    +typedef enum tag_ODM_Support_Interface_Definition {

    WARNING: do not add new typedefs
    torvalds#455: FILE: hal/odm.h:455:
    +typedef enum tag_ODM_Support_IC_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#460: FILE: hal/odm.h:460:
    +typedef enum tag_ODM_Cut_Version_Definition {

    WARNING: do not add new typedefs
    torvalds#475: FILE: hal/odm.h:475:
    +typedef enum tag_ODM_Fab_Version_Definition {

    WARNING: do not add new typedefs
    torvalds#484: FILE: hal/odm.h:484:
    +typedef enum tag_ODM_RF_Path_Bit_Definition {

    WARNING: do not add new typedefs
    torvalds#495: FILE: hal/odm.h:495:
    +typedef enum tag_ODM_RF_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#516: FILE: hal/odm.h:516:
    +typedef enum tag_ODM_MAC_PHY_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#522: FILE: hal/odm.h:522:
    +typedef enum tag_BT_Coexist_Definition {

    WARNING: do not add new typedefs
    torvalds#530: FILE: hal/odm.h:530:
    +typedef enum tag_Operation_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#543: FILE: hal/odm.h:543:
    +typedef enum tag_Wireless_Mode_Definition {

    WARNING: do not add new typedefs
    torvalds#555: FILE: hal/odm.h:555:
    +typedef enum tag_Band_Type_Definition {

    WARNING: do not add new typedefs
    torvalds#563: FILE: hal/odm.h:563:
    +typedef enum tag_Secondary_Channel_Offset_Definition {

    WARNING: do not add new typedefs
    torvalds#570: FILE: hal/odm.h:570:
    +typedef enum tag_Security_Definition {

    WARNING: do not add new typedefs
    torvalds#582: FILE: hal/odm.h:582:
    +typedef enum tag_Bandwidth_Definition {

    WARNING: do not add new typedefs
    torvalds#593: FILE: hal/odm.h:593:
    +typedef enum tag_Board_Definition {

    WARNING: do not add new typedefs
    torvalds#605: FILE: hal/odm.h:605:
    +typedef enum tag_ODM_Package_Definition {

    WARNING: do not add new typedefs
    torvalds#612: FILE: hal/odm.h:612:
    +typedef enum tag_ODM_TYPE_GPA_Definition {

    WARNING: do not add new typedefs
    torvalds#617: FILE: hal/odm.h:617:
    +typedef enum tag_ODM_TYPE_APA_Definition {

    WARNING: do not add new typedefs
    torvalds#622: FILE: hal/odm.h:622:
    +typedef enum tag_ODM_TYPE_GLNA_Definition {

    WARNING: do not add new typedefs
    torvalds#629: FILE: hal/odm.h:629:
    +typedef enum tag_ODM_TYPE_ALNA_Definition {

    WARNING: do not add new typedefs
    torvalds#637: FILE: hal/odm.h:637:
    +typedef enum tag_CCA_Path {

    WARNING: do not add new typedefs
    torvalds#643: FILE: hal/odm.h:643:
    +typedef struct _ODM_RA_Info_ {

    WARNING: do not add new typedefs
    torvalds#675: FILE: hal/odm.h:675:
    +typedef struct _IQK_MATRIX_REGS_SETTING {

    WARNING: do not add new typedefs
    torvalds#683: FILE: hal/odm.h:683:
    +typedef struct ODM_RF_Calibration_Structure {

    WARNING: do not add new typedefs
    #788: FILE: hal/odm.h:788:
    +typedef struct _FAST_ANTENNA_TRAINNING_ {

    WARNING: do not add new typedefs
    torvalds#828: FILE: hal/odm.h:828:
    +typedef enum _FAT_STATE {

    WARNING: do not add new typedefs
    torvalds#833: FILE: hal/odm.h:833:
    +typedef enum _ANT_DIV_TYPE {

    WARNING: do not add new typedefs
    torvalds#843: FILE: hal/odm.h:843:
    +typedef struct _ODM_PATH_DIVERSITY_ {

    WARNING: do not add new typedefs
    torvalds#852: FILE: hal/odm.h:852:
    +typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE {

    WARNING: do not add new typedefs
    torvalds#860: FILE: hal/odm.h:860:
    +typedef struct _ANT_DETECTED_INFO {

    WARNING: do not add new typedefs
    torvalds#870: FILE: hal/odm.h:870:
    +typedef  struct DM_Out_Source_Dynamic_Mechanism_Structure {

    WARNING: do not add new typedefs
    #1229: FILE: hal/odm.h:1229:
    + typedef enum _ODM_RF_CONTENT {

    WARNING: do not add new typedefs
    #1236: FILE: hal/odm.h:1236:
    +typedef enum _ODM_BB_Config_Type {

    WARNING: do not add new typedefs
    #1246: FILE: hal/odm.h:1246:
    +typedef enum _ODM_RF_Config_Type {

    WARNING: do not add new typedefs
    #1251: FILE: hal/odm.h:1251:
    +typedef enum _ODM_FW_Config_Type {

    WARNING: do not add new typedefs
    #1262: FILE: hal/odm.h:1262:
    +typedef enum _RT_STATUS {

    WARNING: do not add new typedefs
    #1319: FILE: hal/odm.h:1319:
    +typedef enum tag_1R_CCA_Type_Definition {

    WARNING: do not add new typedefs
    #1325: FILE: hal/odm.h:1325:
    +typedef enum tag_RF_Type_Definition {

    WARNING: do not add new typedefs
    #1334: FILE: hal/odm.h:1334:
    +typedef enum tag_SW_Antenna_Switch_Definition {

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-4-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Apr 5, 2021
Fix the following checkpatch errors:

  ERROR: space prohibited before that ',' (ctx:WxW)
  torvalds#280: FILE: drivers/i2c/busses/i2c-nomadik.c:280:
  +	i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
  	                                   ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  torvalds#528: FILE: drivers/i2c/busses/i2c-nomadik.c:528:
  +	i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
 	                                   ^

No functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Apr 16, 2021
Fix the following checkpatch errors:

  ERROR: space prohibited before that ',' (ctx:WxW)
  torvalds#280: FILE: drivers/i2c/busses/i2c-nomadik.c:280:
  +	i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
  	                                   ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  torvalds#528: FILE: drivers/i2c/busses/i2c-nomadik.c:528:
  +	i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
 	                                   ^

No functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
nbdd0121 pushed a commit to nbdd0121/linux that referenced this pull request May 26, 2021
Support Rust `core::fmt::Argument` in vsprintf
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 2, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 7, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 8, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 9, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request Feb 11, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 14, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 15, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
jonhunter pushed a commit to jonhunter/linux that referenced this pull request Feb 16, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this pull request Feb 24, 2022
WARNING: please, no spaces at the start of a line
torvalds#249: FILE: mm/page-writeback.c:2089:
+    {$

ERROR: code indent should use tabs where possible
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#250: FILE: mm/page-writeback.c:2090:
+        .procname   = "dirty_background_ratio",$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: mm/page-writeback.c:2091:
+        .data       = &dirty_background_ratio,$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: mm/page-writeback.c:2092:
+        .maxlen     = sizeof(dirty_background_ratio),$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: mm/page-writeback.c:2093:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: mm/page-writeback.c:2094:
+        .proc_handler   = dirty_background_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: mm/page-writeback.c:2095:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: mm/page-writeback.c:2096:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: mm/page-writeback.c:2097:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: mm/page-writeback.c:2098:
+    {$

ERROR: code indent should use tabs where possible
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: mm/page-writeback.c:2099:
+        .procname   = "dirty_background_bytes",$

ERROR: code indent should use tabs where possible
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: mm/page-writeback.c:2100:
+        .data       = &dirty_background_bytes,$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: mm/page-writeback.c:2101:
+        .maxlen     = sizeof(dirty_background_bytes),$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: mm/page-writeback.c:2102:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: mm/page-writeback.c:2103:
+        .proc_handler   = dirty_background_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: mm/page-writeback.c:2104:
+        .extra1     = SYSCTL_LONG_ONE,$

WARNING: please, no spaces at the start of a line
torvalds#265: FILE: mm/page-writeback.c:2105:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#266: FILE: mm/page-writeback.c:2106:
+    {$

ERROR: code indent should use tabs where possible
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

WARNING: please, no spaces at the start of a line
torvalds#267: FILE: mm/page-writeback.c:2107:
+        .procname   = "dirty_ratio",$

ERROR: code indent should use tabs where possible
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

WARNING: please, no spaces at the start of a line
torvalds#268: FILE: mm/page-writeback.c:2108:
+        .data       = &vm_dirty_ratio,$

ERROR: code indent should use tabs where possible
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

WARNING: please, no spaces at the start of a line
torvalds#269: FILE: mm/page-writeback.c:2109:
+        .maxlen     = sizeof(vm_dirty_ratio),$

ERROR: code indent should use tabs where possible
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#270: FILE: mm/page-writeback.c:2110:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

WARNING: please, no spaces at the start of a line
torvalds#271: FILE: mm/page-writeback.c:2111:
+        .proc_handler   = dirty_ratio_handler,$

ERROR: code indent should use tabs where possible
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#272: FILE: mm/page-writeback.c:2112:
+        .extra1     = SYSCTL_ZERO,$

ERROR: code indent should use tabs where possible
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#273: FILE: mm/page-writeback.c:2113:
+        .extra2     = SYSCTL_ONE_HUNDRED,$

WARNING: please, no spaces at the start of a line
torvalds#274: FILE: mm/page-writeback.c:2114:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#275: FILE: mm/page-writeback.c:2115:
+    {$

ERROR: code indent should use tabs where possible
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

WARNING: please, no spaces at the start of a line
torvalds#276: FILE: mm/page-writeback.c:2116:
+        .procname   = "dirty_bytes",$

ERROR: code indent should use tabs where possible
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

WARNING: please, no spaces at the start of a line
torvalds#277: FILE: mm/page-writeback.c:2117:
+        .data       = &vm_dirty_bytes,$

ERROR: code indent should use tabs where possible
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

WARNING: please, no spaces at the start of a line
torvalds#278: FILE: mm/page-writeback.c:2118:
+        .maxlen     = sizeof(vm_dirty_bytes),$

ERROR: code indent should use tabs where possible
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#279: FILE: mm/page-writeback.c:2119:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

WARNING: please, no spaces at the start of a line
torvalds#280: FILE: mm/page-writeback.c:2120:
+        .proc_handler   = dirty_bytes_handler,$

ERROR: code indent should use tabs where possible
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#281: FILE: mm/page-writeback.c:2121:
+        .extra1     = (void *)&dirty_bytes_min,$

WARNING: please, no spaces at the start of a line
torvalds#282: FILE: mm/page-writeback.c:2122:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#283: FILE: mm/page-writeback.c:2123:
+    {$

ERROR: code indent should use tabs where possible
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#284: FILE: mm/page-writeback.c:2124:
+        .procname   = "dirty_writeback_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

WARNING: please, no spaces at the start of a line
torvalds#285: FILE: mm/page-writeback.c:2125:
+        .data       = &dirty_writeback_interval,$

ERROR: code indent should use tabs where possible
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

WARNING: please, no spaces at the start of a line
torvalds#286: FILE: mm/page-writeback.c:2126:
+        .maxlen     = sizeof(dirty_writeback_interval),$

ERROR: code indent should use tabs where possible
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#287: FILE: mm/page-writeback.c:2127:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#288: FILE: mm/page-writeback.c:2128:
+        .proc_handler   = dirty_writeback_centisecs_handler,$

WARNING: please, no spaces at the start of a line
torvalds#289: FILE: mm/page-writeback.c:2129:
+    },$

WARNING: please, no spaces at the start of a line
torvalds#290: FILE: mm/page-writeback.c:2130:
+    {$

ERROR: code indent should use tabs where possible
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

WARNING: please, no spaces at the start of a line
torvalds#291: FILE: mm/page-writeback.c:2131:
+        .procname   = "dirty_expire_centisecs",$

ERROR: code indent should use tabs where possible
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

WARNING: please, no spaces at the start of a line
torvalds#292: FILE: mm/page-writeback.c:2132:
+        .data       = &dirty_expire_interval,$

ERROR: code indent should use tabs where possible
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

WARNING: please, no spaces at the start of a line
torvalds#293: FILE: mm/page-writeback.c:2133:
+        .maxlen     = sizeof(dirty_expire_interval),$

ERROR: code indent should use tabs where possible
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

WARNING: please, no spaces at the start of a line
torvalds#294: FILE: mm/page-writeback.c:2134:
+        .mode       = 0644,$

ERROR: code indent should use tabs where possible
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

WARNING: please, no spaces at the start of a line
torvalds#295: FILE: mm/page-writeback.c:2135:
+        .proc_handler   = proc_dointvec_minmax,$

ERROR: code indent should use tabs where possible
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#296: FILE: mm/page-writeback.c:2136:
+        .extra1     = SYSCTL_ZERO,$

WARNING: please, no spaces at the start of a line
torvalds#297: FILE: mm/page-writeback.c:2137:
+    },$

total: 37 errors, 49 warnings, 287 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-move-page-writeback-sysctls-to-is-own-file.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
CounterPillow pushed a commit to CounterPillow/linux that referenced this pull request May 7, 2022
Improve help message for failure to allocate DMA memory
kikei pushed a commit to kikei/linux that referenced this pull request Jan 17, 2023
The renesas-irqc interrupt controller is cascaded to the GIC. Hence when
propagating wake-up settings to its parent interrupt controller, the
following lockdep warning is printed:

    =============================================
    [ INFO: possible recursive locking detected ]
    4.2.0-ape6evm-10725-g50fcd7643c034198 torvalds#280 Not tainted
    ---------------------------------------------
    s2ram/1072 is trying to acquire lock:
    (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98

    but task is already holding lock:
    (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98

    other info that might help us debug this:
    Possible unsafe locking scenario:

	  CPU0
	  ----
     lock(&irq_desc_lock_class);
     lock(&irq_desc_lock_class);

    *** DEADLOCK ***

    May be due to missing lock nesting notation

    6 locks held by s2ram/1072:
    #0:  (sb_writers#7){.+.+.+}, at: [<c012eb14>] __sb_start_write+0xa0/0xa8
    #1:  (&of->mutex){+.+.+.}, at: [<c019396c>] kernfs_fop_write+0x4c/0x1bc
    #2:  (s_active#24){.+.+.+}, at: [<c0193974>] kernfs_fop_write+0x54/0x1bc
    #3:  (pm_mutex){+.+.+.}, at: [<c008213c>] pm_suspend+0x10c/0x510
    #4:  (&dev->mutex){......}, at: [<c02af3c4>] __device_suspend+0xdc/0x2cc
    #5:  (&irq_desc_lock_class){-.-...}, at: [<c008d3fc>] __irq_get_desc_lock+0x58/0x98

    stack backtrace:
    CPU: 0 PID: 1072 Comm: s2ram Not tainted 4.2.0-ape6evm-10725-g50fcd7643c034198 torvalds#280
    Hardware name: Generic R8A73A4 (Flattened Device Tree)
    [<c0018078>] (unwind_backtrace) from [<c00144f0>] (show_stack+0x10/0x14)
    [<c00144f0>] (show_stack) from [<c0451f14>] (dump_stack+0x88/0x98)
    [<c0451f14>] (dump_stack) from [<c007b29c>] (__lock_acquire+0x15cc/0x20e4)
    [<c007b29c>] (__lock_acquire) from [<c007c6e0>] (lock_acquire+0xac/0x12c)
    [<c007c6e0>] (lock_acquire) from [<c0457c00>] (_raw_spin_lock_irqsave+0x40/0x54)
    [<c0457c00>] (_raw_spin_lock_irqsave) from [<c008d3fc>] (__irq_get_desc_lock+0x58/0x98)
    [<c008d3fc>] (__irq_get_desc_lock) from [<c008ebbc>] (irq_set_irq_wake+0x20/0xf8)
    [<c008ebbc>] (irq_set_irq_wake) from [<c0260770>] (irqc_irq_set_wake+0x20/0x4c)
    [<c0260770>] (irqc_irq_set_wake) from [<c008ec28>] (irq_set_irq_wake+0x8c/0xf8)
    [<c008ec28>] (irq_set_irq_wake) from [<c02cb8c0>] (gpio_keys_suspend+0x74/0xc0)
    [<c02cb8c0>] (gpio_keys_suspend) from [<c02ae8cc>] (dpm_run_callback+0x54/0x124)

Avoid this false positive by using a separate lockdep class for IRQC
interrupts.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1441798974-25716-2-git-send-email-geert%2Brenesas@glider.be
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Apr 20, 2023
Extend prog_tests with two test cases:

 # ./test_progs --allow=verifier_netfilter_retcode
 torvalds#278/1   verifier_netfilter_retcode/bpf_exit with invalid return code. test1:OK
 torvalds#278/2   verifier_netfilter_retcode/bpf_exit with valid return code. test2:OK
 torvalds#278/3   verifier_netfilter_retcode/bpf_exit with valid return code. test3:OK
 torvalds#278/4   verifier_netfilter_retcode/bpf_exit with invalid return code. test4:OK
 torvalds#278     verifier_netfilter_retcode:OK

This checks that only accept and drop (0,1) are permitted.

NF_QUEUE could be implemented later if we can guarantee that attachment
of such programs can be rejected if they get attached to a pf/hook that
doesn't support async reinjection.

NF_STOLEN could be implemented via trusted helpers that can guarantee
that the skb will eventually be free'd.

v4: test case for bpf_nf_ctx access checks, requested by Alexei Starovoitov.

 # ./test_progs --allow=verifier_netfilter_ctx
 torvalds#280/1   verifier_netfilter_ctx/netfilter invalid context access, size too short:OK
 torvalds#280/2   verifier_netfilter_ctx/netfilter invalid context access, size too short:OK
 torvalds#280/3   verifier_netfilter_ctx/netfilter invalid context access, past end of ctx:OK
 torvalds#280/4   verifier_netfilter_ctx/netfilter invalid context, write:OK
 torvalds#280/5   verifier_netfilter_ctx/netfilter valid context access:OK
 torvalds#280/6   verifier_netfilter_ctx/netfilter valid context access @unpriv:OK
 torvalds#280     verifier_netfilter_ctx:OK
Summary: 1/6 PASSED, 0 SKIPPED, 0 FAILED

This checks:
1/2: partial reads of ctx->{skb,state} are rejected
3. read access past sizeof(ctx) is rejected
4. write to ctx content, e.g. 'ctx->skb = NULL;' is rejected
5. ctx->skb and ctx->state can be read (valid case), but ...
6. ... same program fails for unpriv (CAP_NET_ADMIN needed).

Link: https://lore.kernel.org/bpf/20230419021152.sjq4gttphzzy6b5f@dhcp-172-26-102-232.dhcp.thefacebook.com/
Signed-off-by: Florian Westphal <fw@strlen.de>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Jul 23, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing.

    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 68, ifindex 1, SYN
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 60, ifindex 1, SYN, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 60, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 52, ifindex 1, FIN, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, RST, ACK
    Packet file: packets-2172-86.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if TRAFFIC_MONITOR variable has been passed to
build BPF selftests. For example,

  make TRAFFIC_MONITOR=1 -C tools/testing/selftests/bpf

This command will build BPF selftests with this feature enabled.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Jul 30, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 68, ifindex 1, SYN
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 60, ifindex 1, SYN, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 60, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 52, ifindex 1, FIN, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, RST, ACK
    Packet file: packets-2172-86-select_reuseport:sockhash-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if TRAFFIC_MONITOR variable has been passed to
build BPF selftests. For example,

  make TRAFFIC_MONITOR=1 -C tools/testing/selftests/bpf

This command will build BPF selftests with this feature enabled.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 2, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 68, ifindex 1, SYN
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 60, ifindex 1, SYN, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 60, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, ACK
    IPv4 TCP packet: 127.0.0.1:48165 -> 127.0.0.1:36707, len 52, ifindex 1, FIN, ACK
    IPv4 TCP packet: 127.0.0.1:36707 -> 127.0.0.1:48165, len 52, ifindex 1, RST, ACK
    Packet file: packets-2172-86-select_reuseport:sockhash-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if TRAFFIC_MONITOR variable has been passed to
build BPF selftests. For example,

  make TRAFFIC_MONITOR=1 -C tools/testing/selftests/bpf

This command will build BPF selftests with this feature enabled.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
ThinkerYzu pushed a commit to ThinkerYzu/linux that referenced this pull request Aug 14, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 68, SYN
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 60, SYN, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 60, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 52, FIN, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, RST, ACK
    Packet file: packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if libpcap is available. (Could be found by pkg-config)

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
ThinkerYzu pushed a commit to ThinkerYzu/linux that referenced this pull request Aug 15, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 68, SYN
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 60, SYN, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 60, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 52, FIN, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, RST, ACK
    Packet file: packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if libpcap is available. (Could be found by pkg-config)

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 15, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 68, SYN
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 60, SYN, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 60, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 52, FIN, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, RST, ACK
    Packet file: packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if libpcap is available. (Could be found by pkg-config)

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 16, 2024
Add functions that capture packets and print log in the background. They
are supposed to be used for debugging flaky network test cases. A monitored
test case should call traffic_monitor_start() to start a thread to capture
packets in the background for a given namespace and call
traffic_monitor_stop() to stop capturing. (Or, option '-m' implemented by
the later patches.)

    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 68, SYN
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 60, SYN, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 60, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 52, FIN, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, RST, ACK
    Packet file: packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above is the output of an example. It shows the packets of a connection
and the name of the file that contains captured packets in the directory
/tmp/tmon_pcap. The file can be loaded by tcpdump or wireshark.

This feature only works if libpcap is available. (Could be found by pkg-config)

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240815053254.470944-2-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 16, 2024
Kui-Feng Lee says:

====================
Capture packets in the background for flaky test cases related to
network features.

We have some flaky test cases that are difficult to debug without
knowing what the traffic looks like. Capturing packets, the CI log and
packet files may help developers to fix these flaky test cases.

This patch set monitors a few test cases. Recently, they have been
showing flaky behavior.

    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 68, SYN
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 60, SYN, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 60, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, ACK
    lo      In  IPv4 127.0.0.1:40265 > 127.0.0.1:55907: TCP, length 52, FIN, ACK
    lo      In  IPv4 127.0.0.1:55907 > 127.0.0.1:40265: TCP, length 52, RST, ACK
    Packet file: packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log
    torvalds#280/87 select_reuseport/sockhash IPv4/TCP LOOPBACK test_detach_bpf:OK

The above block is the log of a test case. It shows every packet of a
connection. The captured packets are stored in the file called
packets-2173-86-select_reuseport:sockhash_IPv4_TCP_LOOPBACK_test_detach_bpf-test.log.

We have a set of high-level helpers and a test_progs option to
simplify the process of enabling the traffic monitor. netns_new() and
netns_free() are helpers used to create and delete namespaces while
also enabling the traffic monitor for the namespace based on the
patterns provided by the "-m" option of test_progs. The value of the
"-m" option is a list of patterns used to enable the traffic monitor
for a group of tests or a file containing patterns. CI can utilize
this option to enable monitoring.

traffic_monitor_start() and traffic_monitor_stop() are low-level
functions to start monitoring explicitly. You can have more controls,
however high-level helpers are preferred.

The following block is an example that monitors the network traffic of
a test case in a network namespace.

    struct netns_obj *netns;

    ...
    netns = netns_new("test", true);
    if (!ASSERT_TRUE(netns, "netns_new"))
        goto err;

    ... test ...

    netns_free(netns);

netns_new() will create a network namespace named "test" and bring up
"lo" in the namespace. By passing "true" as the 2nd argument, it will
set the network namespace of the current process to
"test".netns_free() will destroy the namespace, and the process will
leave the "test" namespace if the struct netns_obj returned by
netns_new() is created with "true" as the 2nd argument. If the name of
the test matches the patterns given by the "-m" option, the traffic
monitor will be enabled for the "test" namespace as well.

The packet files are located in the directory "/tmp/tmon_pcap/". The
directory is intended to be compressed as a file so that developers
can download it from the CI.

This feature is enabled only if libpcap is available when building
selftests.
---

Changes from v7:

 - Remove ":" with "__" from the file names of traffic logs. ':' would
   cause an error of the upload-artifact action of github.

 - Move remove_netns() to avoid a forward declaration.

Changes from v6:

 - Remove unnecessary memcpy for addresses.

 - Make packet messages similar to what tcpdump prints.

 - Check return value of inet_ntop().

 - Remove duplicated errno in messages.

 - Print arphdr_type for not handled packets.

 - Set dev "lo" in make_netns().

 - Avoid stacking netns by moving traffic_monitor_start() to earlier
   position.

 - Remove the word "packet" from packet messages.

 - Replace pipe with eventfd (wake_fd) to synchronize background threads.

Changes from v5:

 - Remove "-m" completely if traffic monitor is not enabled.

Changes from v4:

 - Use pkg-config to detect libpcap, and enable traffic monitor if
   there is libpcap.

 - Move traffic monitor functions back to network_helper.c, and pass
   extra parameters to traffic_monitor_start().

 - Use flockfile() & funlockfile() to avoid log interleaving.

 - Show "In", "Out", "M" ... for captured packets.

 - Print a warning message if the user pass a "-m" when libpcap is not
   available.

 - Bring up dev lo in netns_new().

Changes from v3:

 - Rebase to the latest tip of bpf-next/for-next

 - Change verb back to C string.

Changes from v2:

 - Include pcap header files conditionally.

 - Move the implementation of traffic monitor to test_progs.c.

 - Include test name and namespace as a part of names of packet files.

 - Parse and print ICMP(v4|v6) packets.

 - Add netns_new() and netns_free() to create and delete network
   namespaces.

   - Make tc_redirect, sockmap_listen and select_reuseport test in a
     network namespace.

 - Add the "-m" option to test_progs to enable traffic monitor for the
   tests matching the pattern. CI may use this option to enable
   monitoring for a given set of tests.

Changes from v1:

 - Move to calling libpcap directly to capture packets in a background
   thread.

 - Print parsed packet information for TCP and UDP packets.

v1: https://lore.kernel.org/all/20240713055552.2482367-5-thinker.li@gmail.com/
v2: https://lore.kernel.org/all/20240723182439.1434795-1-thinker.li@gmail.com/
v3: https://lore.kernel.org/all/20240730002745.1484204-1-thinker.li@gmail.com/
v4: https://lore.kernel.org/all/20240731193140.758210-1-thinker.li@gmail.com/
v5: https://lore.kernel.org/all/20240806221243.1806879-1-thinker.li@gmail.com/
v6: https://lore.kernel.org/all/20240807183149.764711-1-thinker.li@gmail.com/
v7: https://lore.kernel.org/all/20240810023534.2458227-2-thinker.li@gmail.com/
====================

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants