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: <1396441906.28124.3.camel@chaos.site>
Date:	Wed, 02 Apr 2014 14:31:46 +0200
From:	Jean Delvare <jdelvare@...e.de>
To:	Takashi Iwai <tiwai@...e.de>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Struan Bartlett <struan.bartlett@...il.com>,
	Andreas Schwab <schwab@...ux-m68k.org>,
	gnomes@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ttyprintk: Allow built as a module

Hi Takashi,

Le Wednesday 02 April 2014 à 12:29 +0200, Takashi Iwai a écrit :
> The driver is well written to be used as a module, just the exit call
> is missing.
> 
> Signed-off-by: Takashi Iwai <tiwai@...e.de>
> ---
>  drivers/char/Kconfig     |  2 +-
>  drivers/char/ttyprintk.c | 13 ++++++++++++-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index 1386749b48ff..97816b133c7f 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -40,7 +40,7 @@ config SGI_MBCS
>  source "drivers/tty/serial/Kconfig"
>  
>  config TTY_PRINTK
> -	bool "TTY driver to output user messages via printk"
> +	tristate "TTY driver to output user messages via printk"
>  	depends on EXPERT && TTY
>  	default n
>  	---help---
> diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
> index 2a39c5790364..73606eaaba71 100644
> --- a/drivers/char/ttyprintk.c
> +++ b/drivers/char/ttyprintk.c
> @@ -17,7 +17,7 @@
>  #include <linux/device.h>
>  #include <linux/serial.h>
>  #include <linux/tty.h>
> -#include <linux/export.h>
> +#include <linux/module.h>
>  
>  struct ttyprintk_port {
>  	struct tty_port port;
> @@ -214,4 +214,15 @@ error:
>  	tty_port_destroy(&tpk_port.port);
>  	return ret;
>  }
> +
> +static void ttyprintk_exit(void)

Could be marked __exit.

> +{
> +	tty_unregister_driver(ttyprintk_driver);
> +	put_tty_driver(ttyprintk_driver);
> +	tty_port_destroy(&tpk_port.port);
> +}
> +
>  device_initcall(ttyprintk_init);
> +module_exit(ttyprintk_exit);
> +
> +MODULE_LICENSE("GPL");

Other than this, this looks good, thanks for doing that.

Reviewed-by: Jean Delvare <jdelvare@...e.de>

-- 
Jean Delvare
SUSE L3 Support

--
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