<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/s390/cio/css.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-26T23:00:44Z</updated>
<entry>
<title>s390/cio: Fix device lifecycle handling in css_alloc_subchannel()</title>
<updated>2026-02-26T23:00:44Z</updated>
<author>
<name>Salah Triki</name>
</author>
<published>2026-01-30T20:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c35cfbb5341ba05ad1b4476ffc3c21cc3ff8f603'/>
<id>urn:sha1:c35cfbb5341ba05ad1b4476ffc3c21cc3ff8f603</id>
<content type='text'>
[ Upstream commit f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7 ]

`css_alloc_subchannel()` calls `device_initialize()` before setting up
the DMA masks. If `dma_set_coherent_mask()` or `dma_set_mask()` fails,
the error path frees the subchannel structure directly, bypassing
the device model reference counting.

Once `device_initialize()` has been called, the embedded struct device
must be released via `put_device()`, allowing the release callback to
free the container structure.

Fix the error path by dropping the initial device reference with
`put_device()` instead of calling `kfree()` directly.

This ensures correct device lifetime handling and avoids potential
use-after-free or double-free issues.

Fixes: e5dcf0025d7af ("s390/css: move subchannel lock allocation")
Signed-off-by: Salah Triki &lt;salah.triki@gmail.com&gt;
Reviewed-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390: Remove KMSG_COMPONENT macro</title>
<updated>2025-11-24T10:45:21Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2025-11-20T15:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3d17464f0262c9e3c156d4c6306e32cf530fa47'/>
<id>urn:sha1:c3d17464f0262c9e3c156d4c6306e32cf530fa47</id>
<content type='text'>
The KMSG_COMPONENT macro is a leftover of the s390 specific "kernel
message catalog" which never made it upstream.

Remove the macro in order to get rid of a pointless indirection. Replace
all users with the string it defines. In almost all cases this leads to a
simple replacement like this:

 - #define KMSG_COMPONENT "appldata"
 - #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
 + #define pr_fmt(fmt) "appldata: " fmt

Except for some special cases this is just mechanical/scripted work.

Acked-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio/css: Switch over to sysfs_emit()</title>
<updated>2024-10-25T14:03:25Z</updated>
<author>
<name>Mete Durlu</name>
</author>
<published>2024-10-23T12:11:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ece8f29d69b4b56cb6e3fc2450cc15c0425925fb'/>
<id>urn:sha1:ece8f29d69b4b56cb6e3fc2450cc15c0425925fb</id>
<content type='text'>
Per Documentation/filesystems/sysfs.rst, sysfs_emit() is preferred for
presenting attributes to user space in sysfs. Convert the left-over uses
in the cio/css code.

Signed-off-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Acked-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Tested-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Reviewed-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>[tree-wide] finally take no_llseek out</title>
<updated>2024-09-27T15:18:43Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2024-09-27T01:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb787f4ac0c2e439ea8d7e6387b925f74576bdf8'/>
<id>urn:sha1:cb787f4ac0c2e439ea8d7e6387b925f74576bdf8</id>
<content type='text'>
no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\&lt;no_llseek\&gt;/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: have match() callback in struct bus_type take a const *</title>
<updated>2024-07-03T13:16:54Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2024-07-01T12:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d69d804845985c29ab5be5a4b3b1f4787893daf8'/>
<id>urn:sha1:d69d804845985c29ab5be5a4b3b1f4787893daf8</id>
<content type='text'>
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Reviewed-by: Alex Elder &lt;elder@kernel.org&gt;
Acked-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: convert sprintf()/snprintf() to sysfs_emit()</title>
<updated>2024-04-09T15:29:56Z</updated>
<author>
<name>Li Zhijian</name>
</author>
<published>2024-03-14T09:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aaebea959efb2cccd870990f1b6016ff324b0fb6'/>
<id>urn:sha1:aaebea959efb2cccd870990f1b6016ff324b0fb6</id>
<content type='text'>
Per filesystems/sysfs.rst, show() should only use sysfs_emit()
or sysfs_emit_at() when formatting the value to be returned to user space.

coccinelle complains that there are still a couple of functions that use
snprintf(). Convert them to sysfs_emit().

Generally, this patch is generated by
make coccicheck M=&lt;path/to/file&gt; MODE=patch \
COCCI=scripts/coccinelle/api/device_attr_show.cocci

No functional change intended.

Cc: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Li Zhijian &lt;lizhijian@fujitsu.com&gt;
Link: https://lore.kernel.org/r/20240314095209.1325229-1-lizhijian@fujitsu.com
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/virtio_ccw: use DMA handle from DMA API</title>
<updated>2024-03-13T08:23:46Z</updated>
<author>
<name>Halil Pasic</name>
</author>
<published>2024-03-07T12:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3e9bda38e6d9f2af50b521741071d6406b40152'/>
<id>urn:sha1:e3e9bda38e6d9f2af50b521741071d6406b40152</id>
<content type='text'>
Change and use ccw_device_dma_zalloc() so it returns a virtual address like
before, which can be used to access data. However also pass a new dma32_t
pointer type handle, which correlates to the returned virtual address.
This pointer is used to directly pass/set the DMA handle as returned by the
DMA API.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: make css_bus_type const</title>
<updated>2024-02-09T12:58:15Z</updated>
<author>
<name>Ricardo B. Marliere</name>
</author>
<published>2024-02-03T14:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42c4c8fdbd1a71970d2a7e71d682b6beeb9f92b1'/>
<id>urn:sha1:42c4c8fdbd1a71970d2a7e71d682b6beeb9f92b1</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the css_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: "Ricardo B. Marliere" &lt;ricardo@marliere.net&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240203-bus_cleanup-s390-v1-2-ac891afc7282@marliere.net
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: make sch-&gt;lock spinlock pointer a member</title>
<updated>2023-12-12T13:41:58Z</updated>
<author>
<name>Halil Pasic</name>
</author>
<published>2023-11-01T11:57:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004'/>
<id>urn:sha1:b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004</id>
<content type='text'>
The lock member of struct subchannel used to be a spinlock, but became
a pointer to a spinlock with commit 2ec2298412e1 ("[S390] subchannel
lock conversion."). This might have been justified back then, but with
the current state of affairs, there is no reason to manage a separate
spinlock object.

Let's simplify things and pull the spinlock back into struct subchannel.

Signed-off-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20231101115751.2308307-1-pasic@linux.ibm.com
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: fix a memleak in css_alloc_subchannel</title>
<updated>2023-10-16T11:03:05Z</updated>
<author>
<name>Dinghao Liu</name>
</author>
<published>2023-09-21T07:14:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63e8b94ad1840f02462633abdb363397f56bc642'/>
<id>urn:sha1:63e8b94ad1840f02462633abdb363397f56bc642</id>
<content type='text'>
When dma_set_coherent_mask() fails, sch-&gt;lock has not been
freed, which is allocated in css_sch_create_locks(), leading
to a memleak.

Fixes: 4520a91a976e ("s390/cio: use dma helpers for setting masks")
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Message-Id: &lt;20230921071412.13806-1-dinghao.liu@zju.edu.cn&gt;
Link: https://lore.kernel.org/linux-s390/bd38baa8-7b9d-4d89-9422-7e943d626d6e@linux.ibm.com/
Reviewed-by: Halil Pasic &lt;pasic@linux.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
</feed>
