<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/linux.git/fs/configfs, branch rt-linux-release</title>
<subtitle>StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/linux.git/atom?h=rt-linux-release'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/'/>
<updated>2021-08-25T05:58:49+00:00</updated>
<entry>
<title>configfs: fix a race in configfs_lookup()</title>
<updated>2021-08-25T05:58:49+00:00</updated>
<author>
<name>Sishuai Gong</name>
<email>sishuai@purdue.edu</email>
</author>
<published>2021-08-25T05:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=c42dd069be8dfc9b2239a5c89e73bbd08ab35de0'/>
<id>urn:sha1:c42dd069be8dfc9b2239a5c89e73bbd08ab35de0</id>
<content type='text'>
When configfs_lookup() is executing list_for_each_entry(),
it is possible that configfs_dir_lseek() is calling list_del().
Some unfortunate interleavings of them can cause a kernel NULL
pointer dereference error

Thread 1                  Thread 2
//configfs_dir_lseek()    //configfs_lookup()
list_del(&amp;cursor-&gt;s_sibling);
                         list_for_each_entry(sd, ...)

Fix this by grabbing configfs_dirent_lock in configfs_lookup()
while iterating -&gt;s_children.

Signed-off-by: Sishuai Gong &lt;sishuai@purdue.edu&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: fold configfs_attach_attr into configfs_lookup</title>
<updated>2021-08-25T05:58:46+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-08-25T05:50:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=d07f132a225c013e59aa77f514ad9211ecab82ee'/>
<id>urn:sha1:d07f132a225c013e59aa77f514ad9211ecab82ee</id>
<content type='text'>
This makes it more clear what gets added to the dcache and prepares
for an additional locking fix.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: simplify the configfs_dirent_is_ready</title>
<updated>2021-08-25T05:43:55+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-08-25T05:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=899587c8d0908e5124fd074d52bf05b4b0633a79'/>
<id>urn:sha1:899587c8d0908e5124fd074d52bf05b4b0633a79</id>
<content type='text'>
Return the error directly instead of using a goto.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: return -ENAMETOOLONG earlier in configfs_lookup</title>
<updated>2021-08-25T05:42:44+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-08-25T05:42:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=417b962ddeca2b70eb72d28c87541bdad4e234f8'/>
<id>urn:sha1:417b962ddeca2b70eb72d28c87541bdad4e234f8</id>
<content type='text'>
Just like most other file systems: get the simple checks out of the
way first.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: restore the kernel v5.13 text attribute write behavior</title>
<updated>2021-08-09T14:56:00+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-08-05T04:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=769f52676756b8c5feb302d2d95af59577fc69ec'/>
<id>urn:sha1:769f52676756b8c5feb302d2d95af59577fc69ec</id>
<content type='text'>
Instead of appending new text attribute data at the offset specified by the
write() system call, only pass the newly written data to the .store()
callback.

Reported-by: Bodo Stroesser &lt;bostroesser@gmail.com&gt;
Tested-by: Bodo Stroesser &lt;bostroesser@gmail.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: fix the read and write iterators</title>
<updated>2021-07-13T18:56:24+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-07-13T17:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=420405ecde061fde76d67bd3a67577a563ea758e'/>
<id>urn:sha1:420405ecde061fde76d67bd3a67577a563ea758e</id>
<content type='text'>
Commit 7fe1e79b59ba ("configfs: implement the .read_iter and .write_iter
methods") changed the simple_read_from_buffer() calls into copy_to_iter()
calls and the simple_write_to_buffer() calls into copy_from_iter() calls.
The simple*buffer() methods update the file offset (*ppos) but the read
and write iterators not yet. Make the read and write iterators update the
file offset (iocb-&gt;ki_pos).

This patch has been tested as follows:

 # modprobe target_core_user
 # dd if=/sys/kernel/config/target/dbroot bs=1
/var/target
12+0 records in
12+0 records out
12 bytes copied, 9.5539e-05 s, 126 kB/s

 # cd /sys/kernel/config/acpi/table
 # mkdir test
 # cd test
 # dmesg -c &gt;/dev/null; printf 'SSDT\x8\0\0\0abcdefghijklmnopqrstuvwxyz' | dd of=aml bs=1; dmesg -c
34+0 records in
34+0 records out
34 bytes copied, 0.010627 s, 3.2 kB/s
[  261.056551] ACPI configfs: invalid table length

Reported-by: Yanko Kaneti &lt;yaneti@declera.com&gt;
Cc: Yanko Kaneti &lt;yaneti@declera.com&gt;
Fixes: 7fe1e79b59ba ("configfs: implement the .read_iter and .write_iter methods")
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'configfs-5.13' of git://git.infradead.org/users/hch/configfs</title>
<updated>2021-07-02T21:13:21+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-07-02T21:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=ced4cca754a6322463720768ce50c45c2865ba5b'/>
<id>urn:sha1:ced4cca754a6322463720768ce50c45c2865ba5b</id>
<content type='text'>
Pull configfs updates from Christoph Hellwig:

 - fix a memleak in configfs_release_bin_file (Chung-Chiang Cheng)

 - implement the .read_iter and .write_iter (Bart Van Assche)

 - minor cleanups (Bart Van Assche, me)

* tag 'configfs-5.13' of git://git.infradead.org/users/hch/configfs:
  configfs: simplify configfs_release_bin_file
  configfs: fix memleak in configfs_release_bin_file
  configfs: implement the .read_iter and .write_iter methods
  configfs: drop pointless kerneldoc comments
  configfs: fix the kerneldoc comment for configfs_create_bin_file
</content>
</entry>
<entry>
<title>fs: move ramfs_aops to libfs</title>
<updated>2021-06-29T17:53:48+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-29T02:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=c1e3dbe9818e3caa4e467255a348df56912ca549'/>
<id>urn:sha1:c1e3dbe9818e3caa4e467255a348df56912ca549</id>
<content type='text'>
Move the ramfs aops to libfs and reuse them for kernfs and configfs.
Thosw two did not wire up -&gt;set_page_dirty before and now get
__set_page_dirty_no_writeback, which is the right one for no-writeback
address_space usage.

Drop the now unused exports of the libfs helpers only used for ramfs-style
pagecache usage.

Link: https://lkml.kernel.org/r/20210614061512.3966143-3-hch@lst.de
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>configfs: simplify configfs_release_bin_file</title>
<updated>2021-06-22T07:46:28+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-22T07:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=c886fa3cf6ffbe13006053ceb27c93d41928de30'/>
<id>urn:sha1:c886fa3cf6ffbe13006053ceb27c93d41928de30</id>
<content type='text'>
Remove the clearing of various fields just before freeing the
buffer structure.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>configfs: fix memleak in configfs_release_bin_file</title>
<updated>2021-06-22T07:46:26+00:00</updated>
<author>
<name>Chung-Chiang Cheng</name>
<email>shepjeng@gmail.com</email>
</author>
<published>2021-06-18T07:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/linux.git/commit/?id=3c252b087de08d3cb32468b54a158bd7ad0ae2f7'/>
<id>urn:sha1:3c252b087de08d3cb32468b54a158bd7ad0ae2f7</id>
<content type='text'>
When reading binary attributes in progress, buffer-&gt;bin_buffer is setup in
configfs_read_bin_file() but never freed.

Fixes: 03607ace807b4 ("configfs: implement binary attributes")
Signed-off-by: Chung-Chiang Cheng &lt;cccheng@synology.com&gt;
[hch: move the vfree rather than duplicating it]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
