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] [day] [month] [year] [list]
Message-ID: <20160815084639.GA2226@localhost>
Date:	Mon, 15 Aug 2016 10:46:39 +0200
From:	Johan Hovold <johan@...nel.org>
To:	Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc:	Johan Hovold <johan@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	ldv-project@...uxtesting.org
Subject: Re: [PATCH 2/2] USB: mos7840: fix non-atomic allocation in write path

On Fri, Aug 12, 2016 at 01:05:09AM +0300, Alexey Khoroshilov wrote:
> There is an allocation with GFP_KERNEL flag in mos7840_write(),
> while it may be called from interrupt context.
> 
> Follow-up for commit 191252837626 ("USB: kobil_sct: fix non-atomic allocation in write path")
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> ---
>  drivers/usb/serial/mos7840.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
> index ed378fb232e7..1de2c01c078d 100644
> --- a/drivers/usb/serial/mos7840.c
> +++ b/drivers/usb/serial/mos7840.c
> @@ -1341,7 +1341,7 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
>  
>  	if (urb->transfer_buffer == NULL) {
>  		urb->transfer_buffer =
> -		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
> +		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);

Both patches now applied. I fixed up the odd indentation here while at
it.

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ