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] [day] [month] [year] [list]
Date:	Sun, 30 Dec 2007 08:05:52 -0600
From:	Josh Boyer <jwboyer@...il.com>
To:	devzero@....de
Cc:	linux-kernel@...r.kernel.org, hidave.darkstar@...il.com,
	lcapitulino@...driva.com.br, linux-mtd@...ts.infradead.org,
	randy.dunlap@...cle.com
Subject: Re: [PATCH]: 2.6.24-rc5: mtd: PNC-2000 oops

On Sun, 30 Dec 2007 14:15:13 +0100
devzero@....de wrote:

> while doing some systematical driver load/unload testing i have also come across this one.
> 
> searched lkml and found/tried this patch - seems to work fine, at least driver now behaves as expected:
> insmod: error inserting 'pnc2000.ko': -1 No such device or address
> 
> if it really _works_ is another story, but how can we know ? have searched the net a while for this hardware, but didn`t find _any_ reference that this hardware either exists or existed at all, so it looks that this hardware is very ancient or being used by japanese secret service, only !? :)

[snip] 
 
> @@ -64,16 +63,29 @@ static struct mtd_info *mymtd;
>  
>  static int __init init_pnc2000(void)
>  {
> +	int err;
> +
>  	printk(KERN_NOTICE "Photron PNC-2000 flash mapping: %x at %x\n", WINDOW_SIZE, \
> WINDOW_ADDR);  
> +	pnc_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
> +	if (!pnc_map.virt) {
> +		printk("init_pnc2000(): failed to ioremap\n");
> +		return -EIO;
> +	}
> +
>  	simple_map_init(&pnc_map);
>  
>  	mymtd = do_map_probe("cfi_probe", &pnc_map);
>  	if (mymtd) {
>  		mymtd->owner = THIS_MODULE;
> -		return add_mtd_partitions(mymtd, pnc_partitions, 3);
> +		err = add_mtd_partitions(mymtd, pnc_partitions, 3);
> +		if (err) {
> +			printk("init_pnc2000(): add_mtd_partitions failed\n");
> +			iounmap(pnc_map.virt);
> +		}
>  	}
>  
> +	iounmap(pnc_map.virt);
>  	return -ENXIO;

Sorry, but no.  This bit here is bogus.  It will now iounmap and return
an error even if nothing went wrong.

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