<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/scsi/raid_class.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-25T01:34:28+00:00</updated>
<entry>
<title>scsi: core: raid_class: Remove raid_component_add()</title>
<updated>2023-08-25T01:34:28+00:00</updated>
<author>
<name>Zhu Wang</name>
<email>wangzhu9@huawei.com</email>
</author>
<published>2023-08-22T01:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=60c5fd2e8f3c42a5abc565ba9876ead1da5ad2b7'/>
<id>urn:sha1:60c5fd2e8f3c42a5abc565ba9876ead1da5ad2b7</id>
<content type='text'>
The raid_component_add() function was added to the kernel tree via patch
"[SCSI] embryonic RAID class" (2005). Remove this function since it never
has had any callers in the Linux kernel. And also raid_component_release()
is only used in raid_component_add(), so it is also removed.

Signed-off-by: Zhu Wang &lt;wangzhu9@huawei.com&gt;
Link: https://lore.kernel.org/r/20230822015254.184270-1-wangzhu9@huawei.com
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Fixes: 04b5b5cb0136 ("scsi: core: Fix possible memory leak if device_add() fails")
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Fix possible memory leak if device_add() fails</title>
<updated>2023-08-08T01:34:08+00:00</updated>
<author>
<name>Zhu Wang</name>
<email>wangzhu9@huawei.com</email>
</author>
<published>2023-08-03T02:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04b5b5cb0136ce970333a9c6cec7e46adba1ea3a'/>
<id>urn:sha1:04b5b5cb0136ce970333a9c6cec7e46adba1ea3a</id>
<content type='text'>
If device_add() returns error, the name allocated by dev_set_name() needs
be freed. As the comment of device_add() says, put_device() should be used
to decrease the reference count in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanp().

Fixes: ee959b00c335 ("SCSI: convert struct class_device to struct device")
Signed-off-by: Zhu Wang &lt;wangzhu9@huawei.com&gt;
Link: https://lore.kernel.org/r/20230803020230.226903-1-wangzhu9@huawei.com
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 437</title>
<updated>2019-06-05T15:37:17+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-01T08:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82664963ee5f03b5c604f4c593a5e43f26193610'/>
<id>urn:sha1:82664963ee5f03b5c604f4c593a5e43f26193610</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this file is licensed under gplv2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

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

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Armijn Hemel &lt;armijn@tjaldur.nl&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.129548190@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: raid_attrs: fix unused variable warning</title>
<updated>2018-08-30T11:21:04+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-08-13T22:27:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0eeec01488da9b1403c8c29e73eacac8af9e4bf2'/>
<id>urn:sha1:0eeec01488da9b1403c8c29e73eacac8af9e4bf2</id>
<content type='text'>
I ran into a new warning on randconfig kernels:

drivers/scsi/raid_class.c: In function 'raid_match':
drivers/scsi/raid_class.c:64:24: error: unused variable 'i' [-Werror=unused-variable]

This looks like a very old problem that for some reason was very hard to
run into, but it is very easy to fix, by replacing the incorrect #ifdef
with a simpler IS_ENABLED() check.

Fixes: fac829fdcaf4 ("[SCSI] raid_attrs: fix dependency problems")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: raid_class: Add 'JBOD' RAID level</title>
<updated>2018-02-12T16:43:25+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2018-01-24T08:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34e81f7a720d8a638f46b18b35678712dbafb42d'/>
<id>urn:sha1:34e81f7a720d8a638f46b18b35678712dbafb42d</id>
<content type='text'>
Not a real RAID level, but some HBAs support JBOD in addition to the
'classical' RAID levels.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] raid_attrs: fix dependency problems</title>
<updated>2010-03-03T15:47:06+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@suse.de</email>
</author>
<published>2010-03-03T05:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fac829fdcaf451a20106cbc468ff886466320956'/>
<id>urn:sha1:fac829fdcaf451a20106cbc468ff886466320956</id>
<content type='text'>
RAID attributes uses scsi_is_sdev_device() to gate some SCSI specific
checking code.  This causes two problems.  Firstly if SCSI == n just
defining scsi_is_sdev_device() to return false might not be enough to
prevent gcc from emitting the code (and thus referring to undefined
symbols), so this needs surrounding with an ifdef.  Secondly, using
scsi_is_sdev_device() when SCSI is either y or m gives a subtle
problem in the m case: raid_attrs must also be m to use the symbol.
Do the usual Kconfig jiggery-pokery to fix this.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] raid_class: add raid1e</title>
<updated>2010-02-17T23:50:48+00:00</updated>
<author>
<name>Kashyap, Desai</name>
<email>kashyap.desai@lsi.com</email>
</author>
<published>2010-02-17T10:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e4a0cf79d4645b88dd18ff717ec579e1ac48c80'/>
<id>urn:sha1:8e4a0cf79d4645b88dd18ff717ec579e1ac48c80</id>
<content type='text'>
Signed-off-by: Kashyap Desai &lt;kashyap.desai@lsi.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] struct device - replace bus_id with dev_name(), dev_set_name()</title>
<updated>2009-01-02T16:22:16+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2008-12-03T21:41:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=71610f55fa4db63dbf5385929a47c9fb2451f332'/>
<id>urn:sha1:71610f55fa4db63dbf5385929a47c9fb2451f332</id>
<content type='text'>
[jejb: limit ioctl to returning 20 characters to avoid overrun
       on long device names and add a few more conversions]
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>SCSI: convert struct class_device to struct device</title>
<updated>2008-04-20T02:10:33+00:00</updated>
<author>
<name>Tony Jones</name>
<email>tonyj@suse.de</email>
</author>
<published>2008-02-21T23:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee959b00c335d7780136c5abda37809191fe52c3'/>
<id>urn:sha1:ee959b00c335d7780136c5abda37809191fe52c3</id>
<content type='text'>
It's big, but there doesn't seem to be a way to split it up smaller...

Signed-off-by: Tony Jones &lt;tonyj@suse.de&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[SCSI] transport_class: BUG if we can't release the attribute container</title>
<updated>2008-04-07T17:19:10+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-04-02T15:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f3edc6936e3f6be3f1df1e89c141ae028fa605e'/>
<id>urn:sha1:2f3edc6936e3f6be3f1df1e89c141ae028fa605e</id>
<content type='text'>
Every current transport class calls transport_container_release but
ignores the return value.  This is catastrophic if it returns an error
because the containers are part of a global list and the next action of
almost every transport class is to free the memory used by the
container.

Fix this by making transport_container_release a void, but making it BUG
if attribute_container_release returns an error ... this catches the
root cause of a system panic much earlier.  If we don't do this, we get
an eventual BUG when the attribute container list notices the corruption
caused by the freed memory it's still referencing.

Also made attribute_container_release __must_check as a reminder.

Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
</feed>
