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: <1228065694.3196.61.camel@calx>
Date:	Sun, 30 Nov 2008 11:21:34 -0600
From:	Matt Mackall <mpm@...enic.com>
To:	Hollis Blanchard <hollisb@...ibm.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 1 of 2] netconsole: don't require struct console to
	send data

On Thu, 2008-11-27 at 15:11 -0600, Hollis Blanchard wrote:
> This will allow callers not on the console path to use write_msg().
> 
> Signed-off-by: Hollis Blanchard <hollisb@...ibm.com>
> 
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -67,7 +67,7 @@ __setup("netconsole=", option_setup);
>  /* Linked list of all configured targets */
>  static LIST_HEAD(target_list);
>  
> -/* This needs to be a spinlock because write_msg() cannot sleep */
> +/* This needs to be a spinlock because netconsole_write_msg() cannot sleep */
>  static DEFINE_SPINLOCK(target_list_lock);
>  
>  /**
> @@ -694,7 +694,7 @@ static struct notifier_block netconsole_
>  	.notifier_call  = netconsole_netdev_event,
>  };
>  
> -static void write_msg(struct console *con, const char *msg, unsigned int len)
> +static void netconsole_write_msg(const char *msg, unsigned int len)
>  {
>  	int frag, left;
>  	unsigned long flags;
> @@ -728,10 +728,15 @@ static void write_msg(struct console *co
>  	spin_unlock_irqrestore(&target_list_lock, flags);
>  }
>  
> +static void netconsole_console_write(struct console *con, const char *msg, unsigned int len)
> +{
> +	netconsole_write_msg(msg, len);
> +}
> +
>  static struct console netconsole = {
>  	.name	= "netcon",
>  	.flags	= CON_ENABLED,
> -	.write	= write_msg,
> +	.write	= netconsole_console_write,
>  };

This looks fine functionally, but the name change strikes me as
gratuitous.
 
>  static int __init init_netconsole(void)
-- 
Mathematics is the supreme nostalgia of our time.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ