<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/drivers/char, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-09-04T18:38:02+00:00</updated>
<entry>
<title>Merge branch 'headers' of git://git.infradead.org/users/willy/pagecache.git</title>
<updated>2026-09-04T18:38:02+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T18:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=54497287dc007fdd0596c9f98d5030172fc03dc4'/>
<id>urn:sha1:54497287dc007fdd0596c9f98d5030172fc03dc4</id>
<content type='text'>
# Conflicts:
#	net/ceph/osd_client.c
</content>
</entry>
<entry>
<title>Merge branch 'linux-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git</title>
<updated>2026-09-04T18:20:50+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T18:20:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=afa57f52c494e82bc0295bf25041e1823d9028d8'/>
<id>urn:sha1:afa57f52c494e82bc0295bf25041e1823d9028d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'for-next-tpm' of https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git</title>
<updated>2026-09-04T17:50:55+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:50:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a3dd383ca57eb9f0435ac8245f21788808e2ab5d'/>
<id>urn:sha1:a3dd383ca57eb9f0435ac8245f21788808e2ab5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git</title>
<updated>2026-09-04T17:22:01+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:22:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=e86956e0583e463abca3579541026a16a10f2752'/>
<id>urn:sha1:e86956e0583e463abca3579541026a16a10f2752</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hwrng: cctrng - Fix runtime PM usage counter leak</title>
<updated>2026-09-04T09:49:32+00:00</updated>
<author>
<name>Ruoyu Wang</name>
<email>ruoyuw560@gmail.com</email>
</author>
<published>2026-08-14T13:39:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=58d27c41542be6c40edac4f91f35a1dd8bf0d2c2'/>
<id>urn:sha1:58d27c41542be6c40edac4f91f35a1dd8bf0d2c2</id>
<content type='text'>
pm_runtime_get_sync() increments the device usage counter even when
runtime resume fails. cctrng_read() propagates errors from
cc_trng_pm_get() without scheduling the work that later drops the
counter, so a clock or reset-completion failure in cctrng_resume()
leaves the counter elevated.

Use pm_runtime_resume_and_get(), which drops the usage counter when
resume fails and returns zero on success. This preserves the existing
success path while balancing the error path.

This issue was found by a static analysis checker and confirmed by
manual source review.

Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
Signed-off-by: Ruoyu Wang &lt;ruoyuw560@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>mm: move drivers/char/mem.c to mm/char-mem.c</title>
<updated>2026-09-04T00:39:08+00:00</updated>
<author>
<name>Lorenzo Stoakes (ARM)</name>
<email>ljs@kernel.org</email>
</author>
<published>2026-09-02T18:00:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=be1e360ba6376c1eb49ea34b895e5200e7d21d8b'/>
<id>urn:sha1:be1e360ba6376c1eb49ea34b895e5200e7d21d8b</id>
<content type='text'>
Patch series "mm: make MAP_PRIVATE-/dev/zero mappings truly anonymous".

Historically anonymous memory was obtained in linux by MAP_PRIVATE-mapping
/dev/zero.

The canonical way of doing these now is mmap() specifying MAP_PRIVATE |
MAP_ANON, but we must continue to support the legacy means of obtaining
these mappings.

As-is these mappings are an unusual edge-case - they satisfy
vma_is_anonymous() but have non-NULL vma-&gt;vm_file, and their page offset
is the offset into the /dev/zero file.

Commit 93c0c8dc87f6 ("mm/rmap: use anon pgoff to track MAP_PRIVATE
file-backed anon folios") causes all other anonymous folios to be tracked
by their anon index (vma-&gt;vm_start &gt;&gt; PAGE_SHIFT at the point of first
fault), leaving MAP_PRIVATE-/dev/zero as the outlier.

This series remedies the situation by making MAP_PRIVATE-/dev/zero
mappings truly anonymous with !vma-&gt;vm_file and correct anonymous page
offset.

It starts by bringing the memory character driver into mm/ - this file
implements /dev/zero, /dev/mem among other things and is already (as
clearly indicated by its name) within the remit of memory management.

By doing this, the file_is_dev_zero() function can be provided, internal
to mm, which allows for positive identification of these mappings.

Using this, first prevent any other mappings from mapping memory
anonymously, then make these mappings truly anonymous and eliminate all
code in the kernel that previously had to account for these strange
beasts.

Finally, it adds userland VMA tests to assert the behaviour and selftests
to assert expected merge behaviour.


This patch (of 6):

The memory character driver implements several mm-specific features and is
always compiled into the kernel, so move it to mm/ where it belongs.

Among other things the driver implements /dev/mem which provides raw
access to physical memory, and /dev/zero which either allows mapping of a
shmem region (if mapped with MAP_SHARED) or, uniquely, anonymous memory
(if mapped MAP_PRIVATE).

This change lays the foundations to allow MAP_PRIVATE-/dev/zero to be
mapped precisely the same as anonymous memory is mapped as currently it is
an edge case within mm.

Also update a couple of comments that reference 'drivers/char/mem.c' to
reference 'mm/char-mem.c'.

Link: https://lore.kernel.org/20260902-map-private-dev-zero-v1-0-a578c730cec7@kernel.org
Link: https://lore.kernel.org/20260902-map-private-dev-zero-v1-1-a578c730cec7@kernel.org
Signed-off-by: Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;
Acked-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;
Cc: David Hildenbrand &lt;david@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Jann Horn &lt;jannh@google.com&gt;
Cc: Liam R. Howlett &lt;liam@infradead.org&gt;
Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Pedro Falcato &lt;pfalcato@suse.de&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Vlastimil Babka &lt;vbabka@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>virtio_console: fix race between hvc put_chars and virtqueue teardown on freeze</title>
<updated>2026-09-03T15:25:00+00:00</updated>
<author>
<name>Sungho Bae</name>
<email>baver.bae@lge.com</email>
</author>
<published>2026-06-03T18:37:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=6734bbdcd1ad58f4e727f3bb6b121fa1b1abfb6e'/>
<id>urn:sha1:6734bbdcd1ad58f4e727f3bb6b121fa1b1abfb6e</id>
<content type='text'>
With no_console_suspend enabled, hvc console output can continue while
virtio_console is freezing. In that window, put_chars can still enqueue
buffers to the output virtqueue while virtcons_freeze is tearing queues
down, triggering a BUG_ON in virtqueue_detach_unused_buf_split:

  BUG_ON(vq-&gt;vq.num_free != vq-&gt;split.vring.num)

Add a pm_freezing flag to ports_device. Set it via smp_store_release()
at the start of virtcons_freeze(); put_chars() and __send_to_port() drop
output while the flag is set, checked via smp_load_acquire().

The check in __send_to_port() is placed under outvq_lock, making it
atomic with remove_port_data() which also acquires outvq_lock. Once
remove_port_data() returns for a given port, no concurrent
__send_to_port() can add buffers before remove_vqs() tears down the vq.

After setting pm_freezing, acquire and release outvq_lock for each port
(protected by ports_lock to prevent list manipulation races) before
calling virtio_reset_device(). A TX thread that already passed the
pm_freezing check may still hold outvq_lock while spinning for host
acknowledgment; the drain loop ensures all such threads have completed
before the device is reset.

Clear pm_freezing in virtcons_restore() only after all port-&gt;out_vq
pointers have been reassigned to the newly allocated virtqueues,
preventing TX paths from dereferencing freed vqs during restore.

Link: https://sashiko.dev/#/patchset/20260519162242.7324-1-baver.bae%40gmail.com
Signed-off-by: Sungho Bae &lt;baver.bae@lge.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260603183757.21587-5-baver.bae@gmail.com&gt;
</content>
</entry>
<entry>
<title>virtio_console: fix control queue race during restore</title>
<updated>2026-09-03T15:25:00+00:00</updated>
<author>
<name>Sungho Bae</name>
<email>baver.bae@lge.com</email>
</author>
<published>2026-06-03T18:37:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=01933589c95cdbe0d37cf1b165beb4e5c8a95a3f'/>
<id>urn:sha1:01933589c95cdbe0d37cf1b165beb4e5c8a95a3f</id>
<content type='text'>
In virtcons_restore(), after virtio_device_ready() sets DRIVER_OK, the
device becomes active. If the control receive queue (c_ivq) is populated
immediately, the host can instantly deliver pending control messages
(e.g., VIRTIO_CONSOLE_PORT_REMOVE).

This triggers the control_work_handler(), which can modify the
portdev-&gt;ports list concurrently with the unprotected list_for_each_entry
loop in virtcons_restore(), leading to list corruption or Use-After-Free.

Fix this by deferring the population of the control receive queue
(fill_queue for c_ivq) until after the list iteration is complete. This
ensures the host cannot inject control messages during the vulnerable
window.

Signed-off-by: Sungho Bae &lt;baver.bae@lge.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260603183757.21587-4-baver.bae@gmail.com&gt;
</content>
</entry>
<entry>
<title>virtio_console: fix hot-unplug races in TX paths</title>
<updated>2026-09-03T15:24:59+00:00</updated>
<author>
<name>Sungho Bae</name>
<email>baver.bae@lge.com</email>
</author>
<published>2026-06-03T18:37:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=eed3dd2a9a29d52395c74e2ad86eebfedacfc17f'/>
<id>urn:sha1:eed3dd2a9a29d52395c74e2ad86eebfedacfc17f</id>
<content type='text'>
When a port is hot-unplugged, unplug_port() nullifies port-&gt;portdev.
However, concurrent TX paths (__send_to_port, put_chars) could read a
stale pointer or encounter a NULL pointer dereference.

Add READ_ONCE(port-&gt;portdev) and NULL checks in the TX paths. In
__send_to_port(), move the out_vq assignment inside the outvq_lock and
check portdev under the lock. Correspondingly, update unplug_port() to
NULL out port-&gt;portdev while holding the outvq_lock to serialize with
__send_to_port().

In put_chars(), return count instead of 0 on unplug to prevent the hvc
layer from spinning in an infinite retry loop.

Signed-off-by: Sungho Bae &lt;baver.bae@lge.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260603183757.21587-3-baver.bae@gmail.com&gt;
</content>
</entry>
<entry>
<title>virtio_console: refactor __send_to_port() buffer ownership</title>
<updated>2026-09-03T15:24:59+00:00</updated>
<author>
<name>Sungho Bae</name>
<email>baver.bae@lge.com</email>
</author>
<published>2026-06-03T18:37:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=fed9bee42c6c912f8dad651f3efcf4e19f759cfd'/>
<id>urn:sha1:fed9bee42c6c912f8dad651f3efcf4e19f759cfd</id>
<content type='text'>
Modify __send_to_port() to take ownership of a struct port_buffer *
instead of a void * raw buffer.

Previously, put_chars() would pass a raw kmemdup'd buffer and free it
immediately after __send_to_port() returned. This caused a potential
Use-After-Free and data corruption if the virtqueue was shared with
nonblocking writers, as virtqueue_get_buf() might return an older
completed buffer, causing the newly added buffer to be kfree'd while the
host is still DMAing from it.

By transferring ownership of the allocated port_buffer to __send_to_port(),
we ensure that the exact buffer returned by the host is the one that gets
freed, resolving the memory lifecycle mismatch.

Signed-off-by: Sungho Bae &lt;baver.bae@lge.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-ID: &lt;20260603183757.21587-2-baver.bae@gmail.com&gt;
</content>
</entry>
</feed>
