<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/s390/cio, branch linux-4.4.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-07-20T14:22:31+00:00</updated>
<entry>
<title>s390/cio: dont call css_wait_for_slow_path() inside a lock</title>
<updated>2021-07-20T14:22:31+00:00</updated>
<author>
<name>Vineeth Vijayan</name>
<email>vneethv@linux.ibm.com</email>
</author>
<published>2021-06-09T07:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4be1fa6d2d193087ba9cda454ec3399e24b6c08d'/>
<id>urn:sha1:4be1fa6d2d193087ba9cda454ec3399e24b6c08d</id>
<content type='text'>
commit c749d8c018daf5fba6dfac7b6c5c78b27efd7d65 upstream.

Currently css_wait_for_slow_path() gets called inside the chp-&gt;lock.
The path-verification-loop of slowpath inside this lock could lead to
deadlock as reported by the lockdep validator.

The ccw_device_get_chp_desc() during the instance of a device-set-online
would try to acquire the same 'chp-&gt;lock' to read the chp-&gt;desc.
The instance of this function can get called from multiple scenario,
like probing or setting-device online manually. This could, in some
corner-cases lead to the deadlock.

lockdep validator reported this as,

        CPU0                    CPU1
        ----                    ----
   lock(&amp;chp-&gt;lock);
                                lock(kn-&gt;active#43);
                                lock(&amp;chp-&gt;lock);
   lock((wq_completion)cio);

The chp-&gt;lock was introduced to serialize the access of struct
channel_path. This lock is not needed for the css_wait_for_slow_path()
function, so invoke the slow-path function outside this lock.

Fixes: b730f3a93395 ("[S390] cio: add lock to struct channel_path")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Vineeth Vijayan &lt;vneethv@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: add cond_resched() in the slow_eval_known_fn() loop</title>
<updated>2020-09-03T09:19:25+00:00</updated>
<author>
<name>Vineeth Vijayan</name>
<email>vneethv@linux.ibm.com</email>
</author>
<published>2020-06-18T14:42:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c86b5b56fb1b356b8f71973b6ac6bd9bfb842f2c'/>
<id>urn:sha1:c86b5b56fb1b356b8f71973b6ac6bd9bfb842f2c</id>
<content type='text'>
[ Upstream commit 0b8eb2ee9da1e8c9b8082f404f3948aa82a057b2 ]

The scanning through subchannels during the time of an event could
take significant amount of time in case of platforms with lots of
known subchannels. This might result in higher scheduling latencies
for other tasks especially on systems with a single CPU. Add
cond_resched() call, as the loop in slow_eval_known_fn() can be
executed for a longer duration.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-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/qdio: put thinint indicator after early error</title>
<updated>2020-06-30T00:07:50+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2020-04-09T07:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e22955825919d871f5d70bbbfe6f50dc89550a8'/>
<id>urn:sha1:4e22955825919d871f5d70bbbfe6f50dc89550a8</id>
<content type='text'>
[ Upstream commit 75e82bec6b2622c6f455b7a543fb5476a5d0eed7 ]

qdio_establish() calls qdio_setup_thinint() via qdio_setup_irq().
If the subsequent qdio_establish_thinint() fails, we miss to put the
DSCI again. Thus the DSCI isn't available for re-use. Given enough of
such errors, we could end up with having only the shared DSCI available.

Merge qdio_setup_thinint() into qdio_establish_thinint(), and deal with
such an error internally.

Fixes: 779e6e1c724d ("[S390] qdio: new qdio driver.")
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Benjamin Block &lt;bblock@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: avoid duplicated 'ADD' uevents</title>
<updated>2020-05-02T15:20:31+00:00</updated>
<author>
<name>Cornelia Huck</name>
<email>cohuck@redhat.com</email>
</author>
<published>2020-03-27T12:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=612812b0d59893da30c632b41300baee6849eddc'/>
<id>urn:sha1:612812b0d59893da30c632b41300baee6849eddc</id>
<content type='text'>
[ Upstream commit 05ce3e53f375295c2940390b2b429e506e07655c ]

The common I/O layer delays the ADD uevent for subchannels and
delegates generating this uevent to the individual subchannel
drivers. The io_subchannel driver will do so when the associated
ccw_device has been registered -- but unconditionally, so more
ADD uevents will be generated if a subchannel has been unbound
from the io_subchannel driver and later rebound.

To fix this, only generate the ADD event if uevents were still
suppressed for the device.

Fixes: fa1a8c23eb7d ("s390: cio: Delay uevents for subchannels")
Message-Id: &lt;20200327124503.9794-2-cohuck@redhat.com&gt;
Reported-by: Boris Fiuczynski &lt;fiuczy@linux.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Reviewed-by: Boris Fiuczynski &lt;fiuczy@linux.ibm.com&gt;
Signed-off-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: cio_ignore_proc_seq_next should increase position index</title>
<updated>2020-03-11T06:51:16+00:00</updated>
<author>
<name>Vasily Averin</name>
<email>vvs@virtuozzo.com</email>
</author>
<published>2020-01-24T05:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e83a845bea9e22a3bdddf3d640dc7ff571f34d0d'/>
<id>urn:sha1:e83a845bea9e22a3bdddf3d640dc7ff571f34d0d</id>
<content type='text'>
[ Upstream commit 8b101a5e14f2161869636ff9cb4907b7749dc0c2 ]

if seq_file .next fuction does not change position index,
read after some lseek can generate unexpected output.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283
Link: https://lore.kernel.org/r/d44c53a7-9bc1-15c7-6d4a-0c10cb9dffce@virtuozzo.com
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/cio: exclude subchannels with no parent from pseudo check</title>
<updated>2019-10-17T20:40:53+00:00</updated>
<author>
<name>Vasily Gorbik</name>
<email>gor@linux.ibm.com</email>
</author>
<published>2019-09-19T13:55:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a179b845b9823e2c3b14c38a9da99280e8495c2f'/>
<id>urn:sha1:a179b845b9823e2c3b14c38a9da99280e8495c2f</id>
<content type='text'>
commit ab5758848039de9a4b249d46e4ab591197eebaf2 upstream.

ccw console is created early in start_kernel and used before css is
initialized or ccw console subchannel is registered. Until then console
subchannel does not have a parent. For that reason assume subchannels
with no parent are not pseudo subchannels. This fixes the following
kasan finding:

BUG: KASAN: global-out-of-bounds in sch_is_pseudo_sch+0x8e/0x98
Read of size 8 at addr 00000000000005e8 by task swapper/0/0

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.0-rc8-07370-g6ac43dd12538 #2
Hardware name: IBM 2964 NC9 702 (z/VM 6.4.0)
Call Trace:
([&lt;000000000012cd76&gt;] show_stack+0x14e/0x1e0)
 [&lt;0000000001f7fb44&gt;] dump_stack+0x1a4/0x1f8
 [&lt;00000000007d7afc&gt;] print_address_description+0x64/0x3c8
 [&lt;00000000007d75f6&gt;] __kasan_report+0x14e/0x180
 [&lt;00000000018a2986&gt;] sch_is_pseudo_sch+0x8e/0x98
 [&lt;000000000189b950&gt;] cio_enable_subchannel+0x1d0/0x510
 [&lt;00000000018cac7c&gt;] ccw_device_recognition+0x12c/0x188
 [&lt;0000000002ceb1a8&gt;] ccw_device_enable_console+0x138/0x340
 [&lt;0000000002cf1cbe&gt;] con3215_init+0x25e/0x300
 [&lt;0000000002c8770a&gt;] console_init+0x68a/0x9b8
 [&lt;0000000002c6a3d6&gt;] start_kernel+0x4fe/0x728
 [&lt;0000000000100070&gt;] startup_continue+0x70/0xd0

Cc: stable@vger.kernel.org
Reviewed-by: Sebastian Ott &lt;sebott@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: avoid calling strlen on null pointer</title>
<updated>2019-10-17T20:40:52+00:00</updated>
<author>
<name>Vasily Gorbik</name>
<email>gor@linux.ibm.com</email>
</author>
<published>2019-09-17T18:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea947b87349e51c41e33923fe9518f72feb0c581'/>
<id>urn:sha1:ea947b87349e51c41e33923fe9518f72feb0c581</id>
<content type='text'>
commit ea298e6ee8b34b3ed4366be7eb799d0650ebe555 upstream.

Fix the following kasan finding:
BUG: KASAN: global-out-of-bounds in ccwgroup_create_dev+0x850/0x1140
Read of size 1 at addr 0000000000000000 by task systemd-udevd.r/561

CPU: 30 PID: 561 Comm: systemd-udevd.r Tainted: G    B
Hardware name: IBM 3906 M04 704 (LPAR)
Call Trace:
([&lt;0000000231b3db7e&gt;] show_stack+0x14e/0x1a8)
 [&lt;0000000233826410&gt;] dump_stack+0x1d0/0x218
 [&lt;000000023216fac4&gt;] print_address_description+0x64/0x380
 [&lt;000000023216f5a8&gt;] __kasan_report+0x138/0x168
 [&lt;00000002331b8378&gt;] ccwgroup_create_dev+0x850/0x1140
 [&lt;00000002332b618a&gt;] group_store+0x3a/0x50
 [&lt;00000002323ac706&gt;] kernfs_fop_write+0x246/0x3b8
 [&lt;00000002321d409a&gt;] vfs_write+0x132/0x450
 [&lt;00000002321d47da&gt;] ksys_write+0x122/0x208
 [&lt;0000000233877102&gt;] system_call+0x2a6/0x2c8

Triggered by:
openat(AT_FDCWD, "/sys/bus/ccwgroup/drivers/qeth/group",
		O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 16
write(16, "0.0.bd00,0.0.bd01,0.0.bd02", 26) = 26

The problem is that __get_next_id in ccwgroup_create_dev might set "buf"
buffer pointer to NULL and explicit check for that is required.

Cc: stable@vger.kernel.org
Reviewed-by: Sebastian Ott &lt;sebott@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/qdio: add sanity checks to the fast-requeue path</title>
<updated>2019-08-25T08:52:47+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2019-07-11T16:17:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f34ef4fb5d307d211ad93b232a94c27bd5cda4af'/>
<id>urn:sha1:f34ef4fb5d307d211ad93b232a94c27bd5cda4af</id>
<content type='text'>
[ Upstream commit a6ec414a4dd529eeac5c3ea51c661daba3397108 ]

If the device driver were to send out a full queue's worth of SBALs,
current code would end up discovering the last of those SBALs as PRIMED
and erroneously skip the SIGA-w. This immediately stalls the queue.

Add a check to not attempt fast-requeue in this case. While at it also
make sure that the state of the previous SBAL was successfully extracted
before inspecting it.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Jens Remus &lt;jremus@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/qdio: handle PENDING state for QEBSM devices</title>
<updated>2019-08-04T07:34:45+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2019-06-03T05:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=375fa4d379842b3737757e7785767841a7f1f034'/>
<id>urn:sha1:375fa4d379842b3737757e7785767841a7f1f034</id>
<content type='text'>
[ Upstream commit 04310324c6f482921c071444833e70fe861b73d9 ]

When a CQ-enabled device uses QEBSM for SBAL state inspection,
get_buf_states() can return the PENDING state for an Output Queue.
get_outbound_buffer_frontier() isn't prepared for this, and any PENDING
buffer will permanently stall all further completion processing on this
Queue.

This isn't a concern for non-QEBSM devices, as get_buf_states() for such
devices will manually turn PENDING buffers into EMPTY ones.

Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks")
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/qdio: don't touch the dsci in tiqdio_add_input_queues()</title>
<updated>2019-07-21T07:07:15+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2019-06-18T11:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=970871c643fc8ba2b0eabe740303c8a155b35e22'/>
<id>urn:sha1:970871c643fc8ba2b0eabe740303c8a155b35e22</id>
<content type='text'>
commit ac6639cd3db607d386616487902b4cc1850a7be5 upstream.

Current code sets the dsci to 0x00000080. Which doesn't make any sense,
as the indicator area is located in the _left-most_ byte.

Worse: if the dsci is the _shared_ indicator, this potentially clears
the indication of activity for a _different_ device.
tiqdio_thinint_handler() will then have no reason to call that device's
IRQ handler, and the device ends up stalling.

Fixes: d0c9d4a89fff ("[S390] qdio: set correct bit in dsci")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@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>
</feed>
