<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/s390/cio/device.c, 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>2020-05-02T15:20:31+00:00</updated>
<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: fix use after free in cmb processing</title>
<updated>2015-10-14T12:32:02+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2015-09-07T17:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6ef15652d260f754ead223d0c55434a3a39fe1d'/>
<id>urn:sha1:a6ef15652d260f754ead223d0c55434a3a39fe1d</id>
<content type='text'>
Devices with active channel measurement are included in a list. When a
device is removed without deactivating channel measurement first the
list_head is freed but still used. Fix this by making sure that
channel measurement is deactivated during device deregistration.

For devices that we deregister because they are no longer accessible
deactivating channel measurement will fail. In this case we can report
success because the FW will no longer access the measurement block.

In addition to these steps keep an extra device reference while
channel measurement is active.

Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: use device_lock during cmb activation</title>
<updated>2015-10-14T12:32:02+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2015-09-15T11:11:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bc6664bdfb949bc69a08113801e7d6acbf6bc3f'/>
<id>urn:sha1:1bc6664bdfb949bc69a08113801e7d6acbf6bc3f</id>
<content type='text'>
Hold the device_lock during [de]activation of the channel measurement
block to synchronize concurrent usage of these functions.

Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Reviewed-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: set device name as early as possible</title>
<updated>2014-06-16T08:31:03+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2014-06-11T11:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c3e7e15c7e420e35132aa3c0a614524cb2ab9e2'/>
<id>urn:sha1:2c3e7e15c7e420e35132aa3c0a614524cb2ab9e2</id>
<content type='text'>
Currently we set the device name at the time we call device_add after
we receive the interrupt for the first I/O. When something is not working
as expected during that first I/O (e.g. we don't receive an interrupt) we
print a message including the device name which has not yet been
initialized.

Set the device name after calling device_initialize (prior to starting
the first I/O) so that we have the name present if some unexpected error
occurs during that first I/O.

Reported-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Reported-by: Jason J. Herne &lt;jjherne@linux.vnet.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: fix irq stats for early interrupts on ccw consoles</title>
<updated>2014-02-21T07:50:13+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2014-01-27T12:29:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=137a14f434705a366cc94b2b32f2488c975863ad'/>
<id>urn:sha1:137a14f434705a366cc94b2b32f2488c975863ad</id>
<content type='text'>
Interrupts which happen on ccw consoles prior to their registration
with the driver core are not accounted to the respective device
driver. Fix this by setting the proper interrupt class during
initialization of ccw consoles.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: reorder initialization of ccw consoles</title>
<updated>2014-02-21T07:50:12+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2014-01-27T12:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e5320960510d6d6f2cbdc7ed33df9791283b7ea'/>
<id>urn:sha1:1e5320960510d6d6f2cbdc7ed33df9791283b7ea</id>
<content type='text'>
Drivers for ccw consoles use ccw_device_probe_console to receive
an initialized ccw device which is already enabled for interrupts.
After that the device driver does the initialization of its private
data. This can race with unsolicited interrupts which can happen
once the device is enabled for interrupts.

Split ccw_device_probe_console into ccw_device_create_console and
ccw_device_enable_console and reorder the initialization of the ccw
console drivers.

While at it mark these functions as __init.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: fix driver callback initialization for ccw consoles</title>
<updated>2014-02-21T07:50:11+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2014-01-27T12:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2253e8d79237c69086ded391e6767afe16972527'/>
<id>urn:sha1:2253e8d79237c69086ded391e6767afe16972527</id>
<content type='text'>
ccw consoles are in use before they can be properly registered with
the driver core. For devices which are in use by a device driver we
rely on the ccw_device's pointer to the driver callbacks to be valid.
For ccw consoles this pointer is NULL until they are registered later
during boot and we dereferenced this pointer. This worked by
chance on 64 bit builds (cdev-&gt;drv was NULL but the optional callback
cdev-&gt;drv-&gt;path_event was also NULL by coincidence) and was unnoticed
until we received reports about boot failures on 31 bit systems.
Fix it by initializing the driver pointer for ccw consoles.

Cc: &lt;stable@vger.kernel.org&gt; # 3.10+
Reported-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Reported-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: use device_lock to synchronize calls to the ccw driver</title>
<updated>2013-12-16T13:38:02+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2013-12-16T09:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00381eeb47ef6b3b70d2a17c89a8205b6f1aa00a'/>
<id>urn:sha1:00381eeb47ef6b3b70d2a17c89a8205b6f1aa00a</id>
<content type='text'>
When calling set_{on,off}line of a ccw device driver we hold the
module reference of the owner. This is pretty useless - we don't
want to prevent module unloading but driver unbinding. Use the
driver core's device_lock instead.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cio: fix unlocked access of online member</title>
<updated>2013-12-16T13:38:01+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2013-12-16T09:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74bd0d859dc3536b01c892abfa9f87620e4bca2f'/>
<id>urn:sha1:74bd0d859dc3536b01c892abfa9f87620e4bca2f</id>
<content type='text'>
Make sure that access to the online member of a ccw device is
guarded by the ccwlock.

Reported-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: replace strict_strtoul() with kstrtoul()</title>
<updated>2013-08-22T10:20:00+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-22T01:18:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0178722be9ed575d1724f6b815b7a1eb74b1ccb7'/>
<id>urn:sha1:0178722be9ed575d1724f6b815b7a1eb74b1ccb7</id>
<content type='text'>
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
