Patch "parport_pc: Avoid FIFO port location truncation" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    parport_pc: Avoid FIFO port location truncation

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:
     parport_pc-avoid-fifo-port-location-truncation.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 <stable@xxxxxxxxxxxxxxx> know about it.



commit 3aa4d259ca6d99a3d655ecb4e396ec19e721f983
Author: Maciej W. Rozycki <macro@xxxxxxxxxxx>
Date:   Fri Sep 23 19:52:08 2022 +0100

    parport_pc: Avoid FIFO port location truncation
    
    [ Upstream commit ab126f51c93a15093df604f661c9480854c005a3 ]
    
    Match the data type of a temporary holding a reference to the FIFO port
    with the type of the original reference coming from `struct parport',
    avoiding data truncation with LP64 ports such as SPARC64 that refer to
    PCI port I/O locations via their corresponding MMIO addresses and will
    therefore have non-zero bits in the high 32-bit part of the reference.
    And in any case it is cleaner to have the data types matching here.
    
    Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Link: https://lore.kernel.org/linux-pci/20220419033752.GA1101844@bhelgaas/
    Acked-by: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>
    Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209231912550.29493@xxxxxxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 02e6485c1ed5..8c72d54d8d16 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -474,7 +474,7 @@ static size_t parport_pc_fifo_write_block_pio(struct parport *port,
 	const unsigned char *bufp = buf;
 	size_t left = length;
 	unsigned long expire = jiffies + port->physport->cad->timeout;
-	const int fifo = FIFO(port);
+	const unsigned long fifo = FIFO(port);
 	int poll_for = 8; /* 80 usecs */
 	const struct parport_pc_private *priv = port->physport->private_data;
 	const int fifo_depth = priv->fifo_depth;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux