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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 16 Jun 2011 18:37:23 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Manuel Zerpies <manuel.f.zerpies@...stud.uni-erlangen.de>
CC:	Duncan Sands <duncan.sands@...e.fr>,
	Greg Kroah-Hartman <gregkh@...e.de>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	christian.dietrich@...ormatik.uni-erlangen.de
Subject: Re: [PATCH 07/11] drivers/usb/atm: use printk_ratelimited() instead
 of printk_ratelimit()

Hello.

Manuel Zerpies wrote:

> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()

> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@...stud.uni-erlangen.de>
> ---
>  drivers/usb/atm/usbatm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

> diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
> index 989e16e..d3448ca 100644
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -81,6 +81,7 @@
>  #include <linux/timer.h>
>  #include <linux/wait.h>
>  #include <linux/kthread.h>
> +#include <linux/ratelimit.h>
>  
>  #ifdef VERBOSE_DEBUG
>  static int usbatm_print_packet(const unsigned char *data, int len);
> @@ -668,8 +669,7 @@ static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
>  	/* racy disconnection check - fine */
>  	if (!instance || instance->disconnected) {
>  #ifdef DEBUG
> -		if (printk_ratelimit())
> -			printk(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
> +		printk_ratelimited(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
>  #endif

    You could use pr_debug_ratelimited() and eliminate #ifdef with that.

WBR, Sergei

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