diff --git a/.gitignore b/.gitignore index 6e49623..75b4d8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/3w-sas-4.19.tar.xz +SOURCES/3w-sas-4.18.0-80.el8.tar.xz diff --git a/.kmod-3w-sas.metadata b/.kmod-3w-sas.metadata index 684cc0c..29ed050 100644 --- a/.kmod-3w-sas.metadata +++ b/.kmod-3w-sas.metadata @@ -1 +1 @@ -5b5f40f8cd50875ed741f20e76c7571f58cd813b SOURCES/3w-sas-4.19.tar.xz +e9bd81dbd359273ffc9e3c8a54274350af938eec SOURCES/3w-sas-4.18.0-80.el8.tar.xz diff --git a/SOURCES/0001-scsi-3ware-fix-return-0-on-the-error-path-of-probe.patch b/SOURCES/0001-scsi-3ware-fix-return-0-on-the-error-path-of-probe.patch new file mode 100644 index 0000000..62a8972 --- /dev/null +++ b/SOURCES/0001-scsi-3ware-fix-return-0-on-the-error-path-of-probe.patch @@ -0,0 +1,55 @@ +From 4dc98c1995482262e70e83ef029135247fafe0f2 Mon Sep 17 00:00:00 2001 +From: Anton Vasilyev +Date: Fri, 27 Jul 2018 16:51:57 +0300 +Subject: [Backport 4dc98c199548] scsi: 3ware: fix return 0 on the error path + of probe + +tw_probe() returns 0 in case of fail of tw_initialize_device_extension(), +pci_resource_start() or tw_reset_sequence() and releases resources. +twl_probe() returns 0 in case of fail of twl_initialize_device_extension(), +pci_iomap() and twl_reset_sequence(). twa_probe() returns 0 in case of +fail of tw_initialize_device_extension(), ioremap() and +twa_reset_sequence(). + +The patch adds retval initialization for these cases. + +Found by Linux Driver Verification project (linuxtesting.org). + +Signed-off-by: Anton Vasilyev +Acked-by: Adam Radford +Signed-off-by: Martin K. Petersen +--- + src/3w-sas.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/3w-sas.c b/src/3w-sas.c +index cf9f2a09b47d9e327457248e986adacf8e530949..40c1e6e64f58a8422e5738a3c6a12799142a6ff0 100644 +--- a/src/3w-sas.c ++++ b/src/3w-sas.c +@@ -1594,6 +1594,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) + + if (twl_initialize_device_extension(tw_dev)) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Failed to initialize device extension"); ++ retval = -ENOMEM; + goto out_free_device_extension; + } + +@@ -1608,6 +1609,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) + tw_dev->base_addr = pci_iomap(pdev, 1, 0); + if (!tw_dev->base_addr) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to ioremap"); ++ retval = -ENOMEM; + goto out_release_mem_region; + } + +@@ -1617,6 +1619,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) + /* Initialize the card */ + if (twl_reset_sequence(tw_dev, 0)) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1d, "Controller reset failed during probe"); ++ retval = -ENOMEM; + goto out_iounmap; + } + +-- +2.31.1 + diff --git a/SPECS/kmod-3w-sas.spec b/SPECS/kmod-3w-sas.spec index 5a6831e..d2cb6ca 100644 --- a/SPECS/kmod-3w-sas.spec +++ b/SPECS/kmod-3w-sas.spec @@ -1,6 +1,8 @@ %global pkg 3w-sas -%global kernel_version 4.18.0-326.el8 +%global driver_version 4.18.0-80.el8 + +%global kernel_version 4.18.0-348.el8 %global _use_internal_dependency_generator 0 %global __find_requires /usr/lib/rpm/redhat/find-requires @@ -18,14 +20,15 @@ Name: kmod-%{pkg} -Version: 4.19 -Release: 6%{?dist} +Version: 4.18.0.80 +Release: 1%{?dist} Summary: 3ware 97xx SAS/SATA RAID Controller (%{pkg}) driver License: GPLv2 URL: https://www.kernel.org/ -Source0: %{pkg}-%{version}.tar.xz +Source0: %{pkg}-%{driver_version}.tar.xz +Patch1: 0001-scsi-3ware-fix-return-0-on-the-error-path-of-probe.patch ExclusiveArch: x86_64 aarch64 @@ -63,7 +66,7 @@ This driver supports 3ware's 97xx series SAS/SATA RAID controller cards: %prep -%autosetup -p1 -n %{pkg}-%{version} +%autosetup -p1 -n %{pkg}-%{driver_version} %build @@ -128,8 +131,6 @@ fi %changelog -* Wed Sep 29 2021 Peter Georg - 4.19-6 -- Rebuild for 4.18.0-326.el8 - -* Tue Sep 28 2021 Peter Georg - 4.19-5 -- Convert to kABI tracking kmod package (kernel >= 4.18.0-315.el8) +* Wed Jan 12 2022 Kmods SIG - 4.18.0.80-1 +- Switch to EL kernel source and versioning +- kABI tracking kmod package (kernel >= 4.18.0-348.el8)