<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/mvsas/mv_init.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-19T14:37:07Z</updated>
<entry>
<title>scsi: mvsas: Fix use-after-free bugs in mvs_work_queue</title>
<updated>2025-10-19T14:37:07Z</updated>
<author>
<name>Duoming Zhou</name>
</author>
<published>2025-09-20T13:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=feb946d2fc9dc754bf3d594d42cd228860ff8647'/>
<id>urn:sha1:feb946d2fc9dc754bf3d594d42cd228860ff8647</id>
<content type='text'>
[ Upstream commit 60cd16a3b7439ccb699d0bf533799eeb894fd217 ]

During the detaching of Marvell's SAS/SATA controller, the original code
calls cancel_delayed_work() in mvs_free() to cancel the delayed work
item mwq-&gt;work_q. However, if mwq-&gt;work_q is already running, the
cancel_delayed_work() may fail to cancel it. This can lead to
use-after-free scenarios where mvs_free() frees the mvs_info while
mvs_work_queue() is still executing and attempts to access the
already-freed mvs_info.

A typical race condition is illustrated below:

CPU 0 (remove)            | CPU 1 (delayed work callback)
mvs_pci_remove()          |
  mvs_free()              | mvs_work_queue()
    cancel_delayed_work() |
      kfree(mvi)          |
                          |   mvi-&gt; // UAF

Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure
that the delayed work item is properly canceled and any executing
delayed work item completes before the mvs_info is deallocated.

This bug was found by static analysis.

Fixes: 20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes")
Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: Constify struct pci_device_id</title>
<updated>2024-12-10T02:59:52Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2024-12-07T16:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9a71ca13f71bf0d32664a1e7d1f00378811d59c'/>
<id>urn:sha1:c9a71ca13f71bf0d32664a1e7d1f00378811d59c</id>
<content type='text'>
'struct pci_device_id' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  70237	   9137	    320	  79694	  1374e	drivers/scsi/3w-9xxx.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  70461	   8913	    320	  79694	  1374e	drivers/scsi/3w-9xxx.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/fc61b1946488c1ea8f7a17a06cf40fbd05dcc6de.1733590049.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2024-05-22T19:13:40Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2024-05-22T19:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d90be6e4aaf23cd4a2c202891399cbafe669aaab'/>
<id>urn:sha1:d90be6e4aaf23cd4a2c202891399cbafe669aaab</id>
<content type='text'>
Pull driver core updates from Greg KH:
 "Here is the small set of driver core and kernfs changes for 6.10-rc1.

  Nothing major here at all, just a small set of changes for some driver
  core apis, and minor fixups. Included in here are:

   - sysfs_bin_attr_simple_read() helper added and used

   - device_show_string() helper added and used

  All usages of these were acked by the various maintainers. Also in
  here are:

   - kernfs minor cleanup

   - removed unused functions

   - typo fix in documentation

   - pay attention to sysfs_create_link() failures in module.c finally

  All of these have been in linux-next for a very long time with no
  reported problems"

* tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  device property: Fix a typo in the description of device_get_child_node_count()
  kernfs: mount: Remove unnecessary ‘NULL’ values from knparent
  scsi: Use device_show_string() helper for sysfs attributes
  platform/x86: Use device_show_string() helper for sysfs attributes
  perf: Use device_show_string() helper for sysfs attributes
  IB/qib: Use device_show_string() helper for sysfs attributes
  hwmon: Use device_show_string() helper for sysfs attributes
  driver core: Add device_show_string() helper for sysfs attributes
  treewide: Use sysfs_bin_attr_simple_read() helper
  sysfs: Add sysfs_bin_attr_simple_read() helper
  module: don't ignore sysfs_create_link() failures
  driver core: Remove unused platform_notify, platform_notify_remove
</content>
</entry>
<entry>
<title>scsi: Use device_show_string() helper for sysfs attributes</title>
<updated>2024-05-04T15:37:04Z</updated>
<author>
<name>Lukas Wunner</name>
</author>
<published>2024-04-20T20:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bb8e30611a4c9a28cb96ea64d1694202ac67da8'/>
<id>urn:sha1:9bb8e30611a4c9a28cb96ea64d1694202ac67da8</id>
<content type='text'>
Deduplicate sysfs -&gt;show() callbacks which expose a string at a static
memory location.  Use the newly introduced device_show_string() helper
in the driver core instead by declaring those sysfs attributes with
DEVICE_STRING_ATTR_RO().

No functional change intended.

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Link: https://lore.kernel.org/r/b11792137186f5a6794f12fdf891d0c6d51b3557.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge patch series "Add LIBSAS_SHT_BASE for libsas"</title>
<updated>2024-03-25T20:09:36Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2024-03-25T20:09:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f378a7501b2a6cd886a1422fbd7e7fa12770598'/>
<id>urn:sha1:4f378a7501b2a6cd886a1422fbd7e7fa12770598</id>
<content type='text'>
John Garry &lt;john.g.garry@oracle.com&gt; says:

There is much duplication in the scsi_host_template structure for the
drivers which use libsas.

Similar to how a standard template is used in libata with
__ATA_BASE_SHT, create a standard template in LIBSAS_SHT_BASE.

Link: https://lore.kernel.org/r/20240308114339.1340549-1-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mvsas: Use LIBSAS_SHT_BASE</title>
<updated>2024-03-25T20:08:30Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2024-03-08T11:43:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1604214fdc7d449d008751c39d453dd9b52e65a'/>
<id>urn:sha1:f1604214fdc7d449d008751c39d453dd9b52e65a</id>
<content type='text'>
Use standard template for scsi_host_template structure to reduce
duplication.

Signed-off-by: John Garry &lt;john.g.garry@oracle.com&gt;
Link: https://lore.kernel.org/r/20240308114339.1340549-6-john.g.garry@oracle.com
Reviewed-by: Igor Pylypiv &lt;ipylypiv@google.com&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mvsas: Add libsas SATA sysfs attributes group</title>
<updated>2024-03-25T20:00:07Z</updated>
<author>
<name>Igor Pylypiv</name>
</author>
<published>2024-03-07T21:44:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95ee29a7b3792c855530848f070c332ce83e54cd'/>
<id>urn:sha1:95ee29a7b3792c855530848f070c332ce83e54cd</id>
<content type='text'>
The added sysfs attributes group enables the configuration of NCQ Priority
feature for HBAs that rely on libsas to manage SATA devices.

Reviewed-by: John Garry &lt;john.g.garry@oracle.com&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Igor Pylypiv &lt;ipylypiv@google.com&gt;
Link: https://lore.kernel.org/r/20240307214418.3812290-5-ipylypiv@google.com
Reviewed-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Delete struct scsi_core</title>
<updated>2023-08-21T21:50:58Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2023-08-15T11:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1136a0225d0582c4464fa37e3a91ed4b19b8745e'/>
<id>urn:sha1:1136a0225d0582c4464fa37e3a91ed4b19b8745e</id>
<content type='text'>
Since commit 79855d178557 ("libsas: remove task_collector mode"), struct
scsi_core only contains a reference to the shost. struct scsi_core is only
used in sas_ha_struct.core, so delete scsi_core and replace with a
reference to the shost there.

Signed-off-by: John Garry &lt;john.g.garry@oracle.com&gt;
Link: https://lore.kernel.org/r/20230815115156.343535-5-john.g.garry@oracle.com
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Delete enum sas_phy_type</title>
<updated>2023-08-21T21:50:57Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2023-08-15T11:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f4e20cd6ef8083f911e4f8bba3c0a99815b44f4'/>
<id>urn:sha1:2f4e20cd6ef8083f911e4f8bba3c0a99815b44f4</id>
<content type='text'>
enum sas_phy_type is used for asd_sas_phy.type, which is only ever set, so
delete this member and the enum.

Signed-off-by: John Garry &lt;john.g.garry@oracle.com&gt;
Link: https://lore.kernel.org/r/20230815115156.343535-4-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libsas: Delete enum sas_class</title>
<updated>2023-08-21T21:50:57Z</updated>
<author>
<name>John Garry</name>
</author>
<published>2023-08-15T11:51:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c46a91709335ef8fccec082201e758531aee1c8f'/>
<id>urn:sha1:c46a91709335ef8fccec082201e758531aee1c8f</id>
<content type='text'>
enum sas_class prob would have been useful if function sas_show_class() was
ever implemented, which it wasn't.

enum sas_class is used as asd_sas_port.class and asd_sas_phy.class, which
are only ever set, so delete these members and the enum.

Signed-off-by: John Garry &lt;john.g.garry@oracle.com&gt;
Link: https://lore.kernel.org/r/20230815115156.343535-3-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Reviewed-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
