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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2016 15:22:18 +0800
From:	Lu Baolu <baolu.lu@...ux.intel.com>
To:	"Tang, Jianqiang" <jianqiang.tang@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	Oliver Neukum <oliver@...kum.org>
Subject: Re: [PATCH v3 1/1] usb: cdc-acm: handle unlinked urb in acm read
 callback

Hi Jianqiang,

I think you need to wait until the release of 4.5-rc1.

Thanks,
Baolu

On 01/20/2016 03:08 PM, Tang, Jianqiang wrote:
> Hi Greg,
>
>    Sorry to disturb you although I know you are very busy  :) 
>    One question is about this patch, does the patch already in the process of merge into kernel?
>    Or need modify still? 
>
> Thanks a lot!
>
> -----Original Message-----
> From: linux-usb-owner@...r.kernel.org [mailto:linux-usb-owner@...r.kernel.org] On Behalf Of Lu Baolu
> Sent: Wednesday, December 30, 2015 12:59 PM
> To: Oliver Neukum <oliver@...kum.org>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org; Lu Baolu <baolu.lu@...ux.intel.com>; Tang, Jianqiang <jianqiang.tang@...el.com>; stable@...r.kernel.org
> Subject: [PATCH v3 1/1] usb: cdc-acm: handle unlinked urb in acm read callback
>
> In current acm driver, the bulk-in callback function ignores the URBs unlinked in usb core.
>
> This causes unexpected data loss in some cases. For example, runtime suspend entry will unlinked all urbs and set urb->status to -ENOENT even those urbs might have data not processed yet.
> Hence, data loss occurs.
>
> This patch lets bulk-in callback function handle unlinked urbs to avoid data loss.
>
> Signed-off-by: Tang Jian Qiang <jianqiang.tang@...el.com>
> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
> Cc: stable@...r.kernel.org
> Acked-by: Oliver Neukum <oneukum@...e.com>
> ---
>  drivers/usb/class/cdc-acm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> change log:
> v1->v2:
> add Acked-by: Oliver Neukum <oneukum@...e.com>.
>
> v2->v3:
> add the change log.
>
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 26ca4f9..8cd193b 100644
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
> @@ -428,7 +428,8 @@ static void acm_read_bulk_callback(struct urb *urb)
>  		set_bit(rb->index, &acm->read_urbs_free);
>  		dev_dbg(&acm->data->dev, "%s - non-zero urb status: %d\n",
>  							__func__, status);
> -		return;
> +		if ((status != -ENOENT) || (urb->actual_length == 0))
> +			return;
>  	}
>  
>  	usb_mark_last_busy(acm->dev);
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@...r.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ