Patch "scsi: g_NCR5380: Fix release_region in error handling" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
scsi: g_NCR5380: Fix release_region in error handling
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-g_ncr5380-fix-release_region-in-error-handling.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7b93ca43b7e21fbe6fb1a6f4ecce4a2f70f424a0Mon Sep 17 00:00:00 2001
From: Ondrej Zary <[email protected]>
Date: Fri, 11 Nov 2016 10:00:20 +1100
Subject: scsi: g_NCR5380: Fix release_region in error handling
From: Ondrej Zary <[email protected]>
commit 7b93ca43b7e21fbe6fb1a6f4ecce4a2f70f424a0 upstream.
When a SW-configurable card is specified but not found, the driver releases wrong region, causing the following message in kernel log:
Trying to free nonexistent resource <0000000000000000-000000000000000f>
Fix it by assigning base earlier.
--- drivers/scsi/g_NCR5380.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/g_NCR5380.c +3 -3
@@ -170,12 +170,12 @@ static int generic_NCR5380_init_one(struif (ports[i]) {/* At this point we have our region reserved */ magic_configure (i,0 , magic);/* no IRQ yet */ -outb (0xc0 , ports[i] +9 ); -if (inb (ports[i] +9 ) !=0x80 ) { + base = ports[i]; +outb (0xc0 , base +9 ); +if (inb (base +9 ) !=0x80 ) { ret = -ENODEV ; goto out_release; } - base = ports[i]; port_idx = i; }else return -EINVAL ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/scsi-g_ncr5380-fix-release_region-in-error-handling.patch