lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091224093036.2ba1ecf5.sfr@canb.auug.org.au>
Date:	Thu, 24 Dec 2009 09:30:36 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Greg KH <greg@...ah.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Stefani Seibold <stefani@...bold.net>
Subject: linux-next: manual merge of the usb tree with Linus' tree

Hi Greg,

Today's linux-next merge of the usb tree got a conflict in
drivers/usb/serial/generic.c between commit
119eecc831a42bd090543568932e440c6831f1bb ("Fix usb_serial_probe() problem
introduced by the recent kfifo changes") from Linus' tree and commit
40b2ba0dfb62bed0f7cc6f699053d18ca4553e91 ("USB: serial: mct_usb232: add
drain on close") from the usb tree.

I fixed it up (see below) and can carry the fix for a while.  The result
needs checking.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/usb/serial/generic.c
index f1ea3a3,3eea1d8..0000000
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@@ -386,12 -386,15 +386,15 @@@ int usb_serial_generic_chars_in_buffer(
  
  	dbg("%s - port %d", __func__, port->number);
  
+ 	spin_lock_irqsave(&port->lock, flags);
  	if (serial->type->max_in_flight_urbs) {
- 		spin_lock_irqsave(&port->lock, flags);
  		chars = port->tx_bytes_flight;
- 		spin_unlock_irqrestore(&port->lock, flags);
- 	} else if (serial->num_bulk_out)
+ 	} else if (serial->num_bulk_out) {
+ 		/* This overcounts badly, but is good enough for drain wait. */
 -		chars = __kfifo_len(port->write_fifo);
 +		chars = kfifo_len(&port->write_fifo);
+ 		chars += port->write_urb_busy * port->bulk_out_size;
+ 	}
+ 	spin_unlock_irqrestore(&port->lock, flags);
  
  	dbg("%s - returns %d", __func__, chars);
  	return chars;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ