<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/orangefs, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-12-31T12:26:48+00:00</updated>
<entry>
<title>orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init()</title>
<updated>2022-12-31T12:26:48+00:00</updated>
<author>
<name>Zhang Xiaoxu</name>
<email>zhangxiaoxu5@huawei.com</email>
</author>
<published>2022-10-18T04:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=786e5296f9e3b045d5ff9098514ce7b8ba1d890d'/>
<id>urn:sha1:786e5296f9e3b045d5ff9098514ce7b8ba1d890d</id>
<content type='text'>
[ Upstream commit 31720a2b109b3080eb77e97b8f6f50a27b4ae599 ]

When insert and remove the orangefs module, there are memory leaked
as below:

unreferenced object 0xffff88816b0cc000 (size 2048):
  comm "insmod", pid 783, jiffies 4294813439 (age 65.512s)
  hex dump (first 32 bytes):
    6e 6f 6e 65 0a 00 00 00 00 00 00 00 00 00 00 00  none............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000005b405fee&gt;] orangefs_debugfs_init.cold+0xaf/0x17f
    [&lt;00000000e5a0085b&gt;] 0xffffffffa02780f9
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

Use the golbal variable as the buffer rather than dynamic allocate to
slove the problem.

Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Fix kmemleak in orangefs_sysfs_init()</title>
<updated>2022-12-31T12:26:48+00:00</updated>
<author>
<name>Zhang Xiaoxu</name>
<email>zhangxiaoxu5@huawei.com</email>
</author>
<published>2022-10-18T04:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ce4ba7fff5af36da82dc5964221367630621b99'/>
<id>urn:sha1:9ce4ba7fff5af36da82dc5964221367630621b99</id>
<content type='text'>
[ Upstream commit 1f2c0e8a587bcafad85019a2d80f158d8d41a868 ]

When insert and remove the orangefs module, there are kobjects memory
leaked as below:

unreferenced object 0xffff88810f95af00 (size 64):
  comm "insmod", pid 783, jiffies 4294813439 (age 65.512s)
  hex dump (first 32 bytes):
    a0 83 af 01 81 88 ff ff 08 af 95 0f 81 88 ff ff  ................
    08 af 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000005a6e4dfe&gt;] orangefs_sysfs_init+0x42/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

unreferenced object 0xffff88810f95ae80 (size 64):
  comm "insmod", pid 783, jiffies 4294813439 (age 65.512s)
  hex dump (first 32 bytes):
    c8 90 0f 02 81 88 ff ff 88 ae 95 0f 81 88 ff ff  ................
    88 ae 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000001a4841fa&gt;] orangefs_sysfs_init+0xc7/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

unreferenced object 0xffff88810f95ae00 (size 64):
  comm "insmod", pid 783, jiffies 4294813440 (age 65.511s)
  hex dump (first 32 bytes):
    60 87 a1 00 81 88 ff ff 08 ae 95 0f 81 88 ff ff  `...............
    08 ae 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000005915e797&gt;] orangefs_sysfs_init+0x12b/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

unreferenced object 0xffff88810f95ad80 (size 64):
  comm "insmod", pid 783, jiffies 4294813440 (age 65.511s)
  hex dump (first 32 bytes):
    78 90 0f 02 81 88 ff ff 88 ad 95 0f 81 88 ff ff  x...............
    88 ad 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000007a14eb35&gt;] orangefs_sysfs_init+0x1ac/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

unreferenced object 0xffff88810f95ac00 (size 64):
  comm "insmod", pid 783, jiffies 4294813440 (age 65.531s)
  hex dump (first 32 bytes):
    e0 ff 67 02 81 88 ff ff 08 ac 95 0f 81 88 ff ff  ..g.............
    08 ac 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000001f38adcb&gt;] orangefs_sysfs_init+0x291/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

unreferenced object 0xffff88810f95ab80 (size 64):
  comm "insmod", pid 783, jiffies 4294813441 (age 65.530s)
  hex dump (first 32 bytes):
    50 bf 2f 02 81 88 ff ff 88 ab 95 0f 81 88 ff ff  P./.............
    88 ab 95 0f 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000031ab7788&gt;] kmalloc_trace+0x27/0xa0
    [&lt;000000009cc7d95b&gt;] orangefs_sysfs_init+0x2f5/0x3a0
    [&lt;00000000722645ca&gt;] 0xffffffffa02780fe
    [&lt;000000004232d9f7&gt;] do_one_initcall+0x87/0x2a0
    [&lt;0000000054f22384&gt;] do_init_module+0xdf/0x320
    [&lt;000000003263bdea&gt;] load_module+0x2f98/0x3330
    [&lt;0000000052cd4153&gt;] __do_sys_finit_module+0x113/0x1b0
    [&lt;00000000250ae02b&gt;] do_syscall_64+0x35/0x80
    [&lt;00000000f11c03c7&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

Should add release function for each kobject_type to free the memory.

Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()</title>
<updated>2022-12-31T12:26:48+00:00</updated>
<author>
<name>Zhang Xiaoxu</name>
<email>zhangxiaoxu5@huawei.com</email>
</author>
<published>2022-10-18T04:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fc221d9a16339a913a0341d3efc7fef339073e1'/>
<id>urn:sha1:3fc221d9a16339a913a0341d3efc7fef339073e1</id>
<content type='text'>
[ Upstream commit d23417a5bf3a3afc55de5442eb46e1e60458b0a1 ]

When insert and remove the orangefs module, then debug_help_string will
be leaked:

  unreferenced object 0xffff8881652ba000 (size 4096):
    comm "insmod", pid 1701, jiffies 4294893639 (age 13218.530s)
    hex dump (first 32 bytes):
      43 6c 69 65 6e 74 20 44 65 62 75 67 20 4b 65 79  Client Debug Key
      77 6f 72 64 73 20 61 72 65 20 75 6e 6b 6e 6f 77  words are unknow
    backtrace:
      [&lt;0000000004e6f8e3&gt;] kmalloc_trace+0x27/0xa0
      [&lt;0000000006f75d85&gt;] orangefs_prepare_debugfs_help_string+0x5e/0x480 [orangefs]
      [&lt;0000000091270a2a&gt;] _sub_I_65535_1+0x57/0xf70 [crc_itu_t]
      [&lt;000000004b1ee1a3&gt;] do_one_initcall+0x87/0x2a0
      [&lt;000000001d0614ae&gt;] do_init_module+0xdf/0x320
      [&lt;00000000efef068c&gt;] load_module+0x2f98/0x3330
      [&lt;000000006533b44d&gt;] __do_sys_finit_module+0x113/0x1b0
      [&lt;00000000a0da6f99&gt;] do_syscall_64+0x35/0x80
      [&lt;000000007790b19b&gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0

When remove the module, should always free debug_help_string. Should
always free the allocated buffer when change the free_debug_help_string.

Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Fix sysfs not cleanup when dev init failed</title>
<updated>2022-12-31T12:26:22+00:00</updated>
<author>
<name>Zhang Xiaoxu</name>
<email>zhangxiaoxu5@huawei.com</email>
</author>
<published>2022-10-18T04:40:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bffadfa883c9c1f04c3d71ed542096de925168bc'/>
<id>urn:sha1:bffadfa883c9c1f04c3d71ed542096de925168bc</id>
<content type='text'>
[ Upstream commit ea60a4ad0cf88b411cde6888b8c890935686ecd7 ]

When the dev init failed, should cleanup the sysfs, otherwise, the
module will never be loaded since can not create duplicate sysfs
directory:

  sysfs: cannot create duplicate filename '/fs/orangefs'

  CPU: 1 PID: 6549 Comm: insmod Tainted: G        W          6.0.0+ #44
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
  Call Trace:
   &lt;TASK&gt;
   dump_stack_lvl+0x34/0x44
   sysfs_warn_dup.cold+0x17/0x24
   sysfs_create_dir_ns+0x16d/0x180
   kobject_add_internal+0x156/0x3a0
   kobject_init_and_add+0xcf/0x120
   orangefs_sysfs_init+0x7e/0x3a0 [orangefs]
   orangefs_init+0xfe/0x1000 [orangefs]
   do_one_initcall+0x87/0x2a0
   do_init_module+0xdf/0x320
   load_module+0x2f98/0x3330
   __do_sys_finit_module+0x113/0x1b0
   do_syscall_64+0x35/0x80
   entry_SYSCALL_64_after_hwframe+0x46/0xb0

  kobject_add_internal failed for orangefs with -EEXIST, don't try to register things with the same name in the same directory.

Fixes: 2f83ace37181 ("orangefs: put register_chrdev immediately before register_filesystem")
Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Remove test for folio error</title>
<updated>2022-06-29T12:51:07+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-04-29T15:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9329883a1c9b200bfe7f3c9e5338c407a690e39b'/>
<id>urn:sha1:9329883a1c9b200bfe7f3c9e5338c407a690e39b</id>
<content type='text'>
The page cache clears the error bit before calling -&gt;read_folio(),
so this condition could never have been true.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Convert to free_folio</title>
<updated>2022-05-10T03:12:53+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-05-01T11:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c78ac80e98ad5065b3ff32680236494b7527e509'/>
<id>urn:sha1:c78ac80e98ad5065b3ff32680236494b7527e509</id>
<content type='text'>
I suspect this isn't actually needed and that releasepage will have
done the job, but convert it for now and we can delete it later.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Convert to release_folio</title>
<updated>2022-05-10T03:12:33+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-05-01T04:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4993474a21b4a041d78be8623b92d94d7c114008'/>
<id>urn:sha1:4993474a21b4a041d78be8623b92d94d7c114008</id>
<content type='text'>
Use folios throughout the release_folio path.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
</content>
</entry>
<entry>
<title>orangefs: Convert orangefs to read_folio</title>
<updated>2022-05-09T20:21:46+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-04-29T15:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a6417885b102ccbd8b5d27d1f7714683b118f25'/>
<id>urn:sha1:1a6417885b102ccbd8b5d27d1f7714683b118f25</id>
<content type='text'>
This is a full conversion which should be large folio ready, although
I have not tested it.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
</content>
</entry>
<entry>
<title>fs: Remove flags parameter from aops-&gt;write_begin</title>
<updated>2022-05-08T18:28:19+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-02-22T19:31:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d6b0cd7579844761ed68926eb3073bab1dca87b'/>
<id>urn:sha1:9d6b0cd7579844761ed68926eb3073bab1dca87b</id>
<content type='text'>
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>fs: Remove aop flags parameter from grab_cache_page_write_begin()</title>
<updated>2022-05-08T18:28:19+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2022-02-22T16:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7446e7cf15f0926866c8e5de90ab278998bf8c8'/>
<id>urn:sha1:b7446e7cf15f0926866c8e5de90ab278998bf8c8</id>
<content type='text'>
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
