<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/misc/cxl/guest.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-11-23T19:03:31Z</updated>
<entry>
<title>cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()</title>
<updated>2022-11-23T19:03:31Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-11T14:54:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=61c80d1c3833e196256fb060382db94f24d3d9a7'/>
<id>urn:sha1:61c80d1c3833e196256fb060382db94f24d3d9a7</id>
<content type='text'>
If device_register() fails in cxl_register_afu|adapter(), the device
is not added, device_unregister() can not be called in the error path,
otherwise it will cause a null-ptr-deref because of removing not added
device.

As comment of device_register() says, it should use put_device() to give
up the reference in the error path. So split device_unregister() into
device_del() and put_device(), then goes to put dev when register fails.

Fixes: 14baf4d9c739 ("cxl: Add guest-specific code")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20221111145440.2426970-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cxl: Use the bitmap API to allocate bitmaps</title>
<updated>2022-07-14T14:53:52Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-07-11T19:14:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b00b176b3a3bcd4679487c23d333be02e533d93'/>
<id>urn:sha1:4b00b176b3a3bcd4679487c23d333be02e533d93</id>
<content type='text'>
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them.

It is less verbose and it improves the semantic.

Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/59010cc7c62443030c69cb1ce0b2b62c5d47e064.1657566849.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h</title>
<updated>2022-05-11T13:06:39Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2022-04-02T09:52:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8d2af70b98109418bb16ff6638d7c1c4336f7fe'/>
<id>urn:sha1:d8d2af70b98109418bb16ff6638d7c1c4336f7fe</id>
<content type='text'>
powerpc's asm/prom.h brings some headers that it doesn't
need itself.

In order to clean it up, first add missing headers in
users of asm/prom.h

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/a2bae89b280e7a7cb87889635d9911d6a245e780.1648833388.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>cxl: Use to_pci_driver() instead of pci_dev-&gt;driver</title>
<updated>2021-10-18T14:20:15Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-10-12T21:03:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=16bd44e54dfba2a403833d11acea63e186de23c6'/>
<id>urn:sha1:16bd44e54dfba2a403833d11acea63e186de23c6</id>
<content type='text'>
Struct pci_driver contains a struct device_driver, so for PCI devices, it's
easy to convert a device_driver * to a pci_driver * with to_pci_driver().
The device_driver * is in struct device, so we don't need to also keep
track of the pci_driver * in struct pci_dev.

Replace pdev-&gt;driver with to_pci_driver().  This is a step toward removing
pci_dev-&gt;driver.

[bhelgaas: split to separate patch]
Link: https://lore.kernel.org/r/20211004125935.2300113-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>cxl: Factor out common dev-&gt;driver expressions</title>
<updated>2021-10-18T14:20:07Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2021-10-12T20:51:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e59b75430f0bf515ac0a6b2d61861aefc601776'/>
<id>urn:sha1:4e59b75430f0bf515ac0a6b2d61861aefc601776</id>
<content type='text'>
Save the struct pci_driver and struct pci_error_handlers pointers from
pdev-&gt;driver instead of chasing the pointers several times.  No functional
change intended.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>urn:sha1:2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cxl: Wrap iterations over afu slices inside 'afu_list_lock'</title>
<updated>2019-01-30T12:36:53Z</updated>
<author>
<name>Vaibhav Jain</name>
<email>vaibhav@linux.ibm.com</email>
</author>
<published>2019-01-29T11:06:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=edeb304f659792fb5bab90d7d6f3408b4c7301fb'/>
<id>urn:sha1:edeb304f659792fb5bab90d7d6f3408b4c7301fb</id>
<content type='text'>
Within cxl module, iteration over array 'adapter-&gt;afu' may be racy
at few points as it might be simultaneously read during an EEH and its
contents being set to NULL while driver is being unloaded or unbound
from the adapter. This might result in a NULL pointer to 'struct afu'
being de-referenced during an EEH thereby causing a kernel oops.

This patch fixes this by making sure that all access to the array
'adapter-&gt;afu' is wrapped within the context of spin-lock
'adapter-&gt;afu_list_lock'.

Fixes: 9e8df8a21963 ("cxl: EEH support")
Cc: stable@vger.kernel.org # v4.3+
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Acked-by: Christophe Lombard &lt;clombard@linux.vnet.ibm.com&gt;
Signed-off-by: Vaibhav Jain &lt;vaibhav@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>misc: cxl: Fix possible null pointer dereference</title>
<updated>2018-10-11T10:15:03Z</updated>
<author>
<name>zhong jiang</name>
<email>zhongjiang@huawei.com</email>
</author>
<published>2018-10-04T05:02:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3dac3583bf1a61db6aaf31dfd752c677a4400afd'/>
<id>urn:sha1:3dac3583bf1a61db6aaf31dfd752c677a4400afd</id>
<content type='text'>
It is not safe to dereference an object before a null test. It is
not needed and just remove them. Ftrace can be used instead.

Signed-off-by: zhong jiang &lt;zhongjiang@huawei.com&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Acked-by: Frederic Barrat &lt;fbarrat@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cxl: remove a dead branch</title>
<updated>2018-08-10T12:12:36Z</updated>
<author>
<name>Mathieu Malaterre</name>
<email>malat@debian.org</email>
</author>
<published>2018-03-22T21:05:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e4ecafb14fd9cd77d8f4320af1922e700db56d2b'/>
<id>urn:sha1:e4ecafb14fd9cd77d8f4320af1922e700db56d2b</id>
<content type='text'>
In commit 14baf4d9c739 ("cxl: Add guest-specific code") the following code
was added:

	if (afu-&gt;crs_len &lt; 0) {
		dev_err(&amp;afu-&gt;dev, "Unexpected configuration record size value\n");
		return -EINVAL;
	}

However the variable `crs_len` is of type u64 and cannot be compared &lt; 0.
Remove the dead code section. Fix the following warning treated as error
with W=1:

../drivers/misc/cxl/guest.c:919:19: error: comparison of unsigned expression &lt; 0 is always false [-Werror=type-limits]

Signed-off-by: Mathieu Malaterre &lt;malat@debian.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>Revert "cxl: Add kernel API to allow a context to operate with relocate disabled"</title>
<updated>2018-07-02T13:54:30Z</updated>
<author>
<name>Alastair D'Silva</name>
<email>alastair@d-silva.org</email>
</author>
<published>2018-06-28T10:05:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c5828150067c47a97f30e690a472e0548d3ac97d'/>
<id>urn:sha1:c5828150067c47a97f30e690a472e0548d3ac97d</id>
<content type='text'>
Remove abandonned capi support for the Mellanox CX4.
The symbol 'cxl_set_translation_mode' is never called, so
ctx-&gt;real_mode is always false.

This reverts commit 7a0d85d313c2066712e530e668bc02bb741a685c.

Signed-off-by: Alastair D'Silva &lt;alastair@d-silva.org&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
