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:	Mon, 6 Oct 2008 10:58:06 +0200 (CEST)
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Alan Cox <alan@...hat.com>
cc:	David Woodhouse <dwmw2@...radead.org>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 67/76] tty: Remove lots of NULL checks

On Sun, 5 Oct 2008, Alan Cox wrote:
> Many tty drivers contain 'can't happen' checks against NULL pointers passed
> in by the tty layer. These have never been possible to occur. Even more
> importantly if they ever do occur we want to know as it would be a serious
> bug.

> diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
> index ae377aa..c0a1df9 100644
> --- a/drivers/char/n_r3964.c
> +++ b/drivers/char/n_r3964.c
> @@ -372,15 +372,8 @@ static void remove_from_rx_queue(struct r3964_info *pInfo,
>  static void put_char(struct r3964_info *pInfo, unsigned char ch)
>  {
>  	struct tty_struct *tty = pInfo->tty;
> -
> -	if (tty == NULL)
> -		return;
> -
>  	/* FIXME: put_char should not be called from an IRQ */
> -	if (tty->ops->put_char) {
> -		tty->ops->put_char(tty, ch);
> -	}
> -	pInfo->bcc ^= ch;
        ^^^^^^^^^^^^^^^^
> +	tty_put_char(tty, ch);
>  }

I have no idea what this `bcc' thingy does, but its removal just struck
my eye...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
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