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, 27 Aug 2007 21:38:19 -0700
From:	"Michael J. Evans" <mjevans1983@...cast.net>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	"Michael Evans" <mjevans1983@...il.com>,
	"Neil Brown" <neilb@...e.de>, "Ingo Molnar" <mingo@...hat.com>,
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch v3 1/1] md: Software Raid autodetect dev list not array

On Monday 27 August 2007, Randy Dunlap wrote:
> On Mon, 27 Aug 2007 15:16:21 -0700 Michael J. Evans wrote:
> 
> > =============================================================
> > --- linux/drivers/md/md.c.orig	2007-08-21 03:19:42.511576248 -0700
> > +++ linux/drivers/md/md.c	2007-08-21 04:30:09.775525710 -0700
> > @@ -24,4 +24,6 @@
> > 
> > +   - autodetect dev list not array: Michael J. Evans 
<mjevans1983@...il.com>
> > +
> 
> Nowadays we use an SCM for such comments, not the source file(s).

SCM?  Is this automatic, where do I go to see it?

> 
> >     This program is free software; you can redistribute it and/or modify
> >     it under the terms of the GNU General Public License as published by
> >     the Free Software Foundation; either version 2, or (at your option)
> > @@ -5752,13 +5754,26 @@ void md_autodetect_dev(dev_t dev)
> >   * Searches all registered partitions for autorun RAID arrays
> >   * at boot time.
> >   */
> > -static dev_t detected_devices[128];
> > -static int dev_cnt;
> > +
> > +static LIST_HEAD(all_detected_devices);
> > +struct detected_devices_node {
> > +	struct list_head list;
> > +	dev_t dev;
> > +};
> >  
> >  void md_autodetect_dev(dev_t dev)
> >  {
> > -	if (dev_cnt >= 0 && dev_cnt < 127)
> > -		detected_devices[dev_cnt++] = dev;
> > +	struct detected_devices_node *node_detected_dev;
> > +	char strbuf[BDEVNAME_SIZE];
> > +
> > +	node_detected_dev = kzalloc(sizeof(*node_detected_dev), GFP_KERNEL);\
> 
> Drop the trailing '\', as someone has already commented on.
> 

I thought I had fixed that, I must have copied the unfixed version out of the 
way when I made the other changes to it.

> > +	if (node_detected_dev) {
> > +		node_detected_dev->dev = dev;
> > +		list_add_tail(&node_detected_dev->list, &all_detected_devices);
> > +	} else {
> > +		printk(KERN_CRIT "md: md_autodetect_dev: kzAlloc node failed"
> > +		" (null return), skipping dev(%d,%d)\n", MAJOR(dev), MINOR(dev));
> 
> printk() formatting is bad.
> Drop the " (null return)" and indent that line more than the
> printk line is indented.
> 
> > +	}
> >  }
> >  
> >  
> 
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 


-
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