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]
Message-ID: <4A25A1DC.3000305@gmail.com>
Date:	Wed, 03 Jun 2009 00:04:12 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Mike Frysinger <vapier@...too.org>
CC:	linux-kernel@...r.kernel.org, Alan Cox <alan@...rguk.ukuu.org.uk>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	Bryan Wu <cooloney@...nel.org>
Subject: Re: [PATCH] tty: bfin_jtag_comm: emulate a TTY over the Blackfin
 EMUDAT/JTAG interface

On 06/02/2009 09:25 PM, Mike Frysinger wrote:
> diff --git a/drivers/char/bfin_jtag_comm.c b/drivers/char/bfin_jtag_comm.c
> new file mode 100644
> index 0000000..854f265
> --- /dev/null
> +++ b/drivers/char/bfin_jtag_comm.c
> @@ -0,0 +1,365 @@
> +#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })

This should be __initconst.

> +#define debug(fmt, args...) pr_debug(DRV_NAME ": " fmt, ## args)

Just define pr_fmt, instead of yet another debug macro.

> +static void
> +bfin_jc_wait_until_sent(struct tty_struct *tty, int timeout)
> +{
> +	unsigned long expire = jiffies + timeout;
> +	while (!circ_empty(&bfin_jc_write_buf)) {
> +		if (signal_pending(current))
> +			break;
> +		if (time_after(jiffies, expire))
> +			break;

Maybe some sort of sleep here?

> +	}
> +}

The tty handling is weird. You should take a reference before accessing
the structure.
--
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