<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/s390/cio/css.c, branch linux-6.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-04T12:19:26Z</updated>
<entry>
<title>s390/cio: Fix device lifecycle handling in css_alloc_subchannel()</title>
<updated>2026-03-04T12:19:26Z</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=fd295a75d828c11acfcc6869c2a12cdaaf9b7722'/>
<id>urn:sha1:fd295a75d828c11acfcc6869c2a12cdaaf9b7722</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/cio: fix a memleak in css_alloc_subchannel</title>
<updated>2023-10-25T10:03:15Z</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=fec769b9fd25cc8a4df96ebbdb251262fe51cca3'/>
<id>urn:sha1:fec769b9fd25cc8a4df96ebbdb251262fe51cca3</id>
<content type='text'>
commit 63e8b94ad1840f02462633abdb363397f56bc642 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: fix out-of-bounds access on cio_ignore free</title>
<updated>2022-10-26T12:47:31Z</updated>
<author>
<name>Peter Oberparleiter</name>
</author>
<published>2022-10-14T10:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b6074112742f65ece71b0f299ca5a6a887d2db6'/>
<id>urn:sha1:1b6074112742f65ece71b0f299ca5a6a887d2db6</id>
<content type='text'>
The channel-subsystem-driver scans for newly available devices whenever
device-IDs are removed from the cio_ignore list using a command such as:

  echo free &gt;/proc/cio_ignore

Since an I/O device scan might interfer with running I/Os, commit
172da89ed0ea ("s390/cio: avoid excessive path-verification requests")
introduced an optimization to exclude online devices from the scan.

The newly added check for online devices incorrectly assumes that
an I/O-subchannel's drvdata points to a struct io_subchannel_private.
For devices that are bound to a non-default I/O subchannel driver, such
as the vfio_ccw driver, this results in an out-of-bounds read access
during each scan.

Fix this by changing the scan logic to rely on a driver-independent
online indication. For this we can use struct subchannel-&gt;config.ena,
which is the driver's requested subchannel-enabled state. Since I/Os
can only be started on enabled subchannels, this matches the intent
of the original optimization of not scanning devices where I/O might
be running.

Fixes: 172da89ed0ea ("s390/cio: avoid excessive path-verification requests")
Fixes: 0c3812c347bf ("s390/cio: derive cdev information only for IO-subchannels")
Cc: &lt;stable@vger.kernel.org&gt; # v5.15
Reported-by: Alexander Egorenkov &lt;egorenar@linux.ibm.com&gt;
Reviewed-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Signed-off-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: Use driver_set_override() instead of open-coding</title>
<updated>2022-04-22T15:13:54Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2022-04-19T11:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e8ee51212b4876f1a8ca4b78d2499e2fc442cf3'/>
<id>urn:sha1:1e8ee51212b4876f1a8ca4b78d2499e2fc442cf3</id>
<content type='text'>
Use a helper to set driver_override to the reduce amount of duplicated
code.  Make the driver_override field const char, because it is not
modified by the core and it matches other subsystems.

Acked-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20220419113435.246203-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: remove uevent suppress from cio driver</title>
<updated>2021-12-06T13:42:24Z</updated>
<author>
<name>Vineeth Vijayan</name>
</author>
<published>2021-06-29T07:38:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a84d1c5006b56166dac477e922643ede01cdbb92'/>
<id>urn:sha1:a84d1c5006b56166dac477e922643ede01cdbb92</id>
<content type='text'>
commit fa1a8c23eb7d ("s390: cio: Delay uevents for subchannels")
introduced suppression of uevents for a subchannel until after it is
clear that the subchannel would not be unregistered again
immediately. This was done to avoid uevents being generated for I/O
subchannels with no valid device, which can happen on LPAR.

However, this also has some drawbacks: All subchannel drivers need to
manually remove the uevent suppression and generate an ADD uevent as
soon as they are sure that the subchannel will stay around. This misses
out on all uevents that are not the initial ADD uevent that would be
generated while uevents are suppressed; for example, all subchannels
were missing the BIND uevent.

As uevents being generated even for I/O subchannels without an
operational device turned out to be not as bad as missing uevents and
complicating the code flow, let's remove uevent suppression for
subchannels.

Signed-off-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
[cohuck@redhat.com: modified changelog]
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20211122103756.352463-2-vneethv@linux.ibm.com
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: check the subchannel validity for dev_busid</title>
<updated>2021-11-08T13:17:49Z</updated>
<author>
<name>Vineeth Vijayan</name>
</author>
<published>2021-11-05T15:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4751f157c194431fae9e9c493f456df8272b871'/>
<id>urn:sha1:a4751f157c194431fae9e9c493f456df8272b871</id>
<content type='text'>
Check the validity of subchanel before reading other fields in
the schib.

Fixes: d3683c055212 ("s390/cio: add dev_busid sysfs entry for each subchannel")
CC: &lt;stable@vger.kernel.org&gt;
Reported-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Signed-off-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Link: https://lore.kernel.org/r/20211105154451.847288-1-vneethv@linux.ibm.com
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: derive cdev information only for IO-subchannels</title>
<updated>2021-10-04T07:49:36Z</updated>
<author>
<name>Vineeth Vijayan</name>
</author>
<published>2021-09-17T13:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c3812c347bfb0dc213556a195e79850c55702f5'/>
<id>urn:sha1:0c3812c347bfb0dc213556a195e79850c55702f5</id>
<content type='text'>
cdev-&gt;online for the purge function must not be checked for the
non-IO subchannel type. Make sure that we are deriving the cdev only
from sch-type SUBCHANNEL_TYPE_IO.

Signed-off-by: Vineeth Vijayan &lt;vneethv@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>
<entry>
<title>s390/cio: avoid excessive path-verification requests</title>
<updated>2021-09-27T11:54:38Z</updated>
<author>
<name>Vineeth Vijayan</name>
</author>
<published>2021-09-10T11:45:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=172da89ed0eaf9d9348f5decb86ad04c624b39d1'/>
<id>urn:sha1:172da89ed0eaf9d9348f5decb86ad04c624b39d1</id>
<content type='text'>
Currently when removing a device from cio_ignore list, we trigger a
path-verification for all the subchannels available in the system. This
could lead to path-verification requests on subchannels with an online
device, which could cause unwanted delay. Instead of all the
subchannels, trigger the path-verifications to those without an online
device.

Reported-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Fixes: 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers")
Signed-off-by: Vineeth Vijayan &lt;vneethv@linux.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2021-09-01T15:44:42Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-09-01T15:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6c3c5704ba70820f6b632982abde06661b7222a'/>
<id>urn:sha1:c6c3c5704ba70820f6b632982abde06661b7222a</id>
<content type='text'>
Pull driver core updates from Greg KH:
 "Here is the big set of driver core patches for 5.15-rc1.

  These do change a number of different things across different
  subsystems, and because of that, there were 2 stable tags created that
  might have already come into your tree from different pulls that did
  the following

   - changed the bus remove callback to return void

   - sysfs iomem_get_mapping rework

  Other than those two things, there's only a few small things in here:

   - kernfs performance improvements for huge numbers of sysfs users at
     once

   - tiny api cleanups

   - other minor changes

  All of these have been in linux-next for a while with no reported
  problems, other than the before-mentioned merge issue"

* tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (33 commits)
  MAINTAINERS: Add dri-devel for component.[hc]
  driver core: platform: Remove platform_device_add_properties()
  ARM: tegra: paz00: Handle device properties with software node API
  bitmap: extend comment to bitmap_print_bitmask/list_to_buf
  drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI
  topology: use bin_attribute to break the size limitation of cpumap ABI
  lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases
  cpumask: introduce cpumap_print_list/bitmask_to_buf to support large bitmask and list
  sysfs: Rename struct bin_attribute member to f_mapping
  sysfs: Invoke iomem_get_mapping() from the sysfs open callback
  debugfs: Return error during {full/open}_proxy_open() on rmmod
  zorro: Drop useless (and hardly used) .driver member in struct zorro_dev
  zorro: Simplify remove callback
  sh: superhyway: Simplify check in remove callback
  nubus: Simplify check in remove callback
  nubus: Make struct nubus_driver::remove return void
  kernfs: dont call d_splice_alias() under kernfs node lock
  kernfs: use i_lock to protect concurrent inode updates
  kernfs: switch kernfs to use an rwsem
  kernfs: use VFS negative dentry caching
  ...
</content>
</entry>
<entry>
<title>s390/cio: add dev_busid sysfs entry for each subchannel</title>
<updated>2021-08-18T08:01:27Z</updated>
<author>
<name>Vineeth Vijayan</name>
</author>
<published>2021-04-25T08:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3683c055212bf910d4e318f7944910ce10dbee6'/>
<id>urn:sha1:d3683c055212bf910d4e318f7944910ce10dbee6</id>
<content type='text'>
Introduce dev_busid, which exports the device-id associated with the
io-subchannel (and message-subchannel). The dev_busid indicates that of
the device which may be physically installed on the corrosponding
subchannel. The dev_busid value "none" indicates that the subchannel
is not valid, there is no I/O device currently associated with the
subchannel.

The dev_busid information would be helpful to write device-specific
udev-rules associated with the subchannel. The dev_busid interface would
be available even when the sch is not bound to any driver or if there is
no operational device connected on it. Hence this attribute can be used to
write udev-rules which are specific to the device associated with the
subchannel.

Signed-off-by: Vineeth Vijayan &lt;vneethv@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>
