Re: OOPS swapon kernel 2.2.9

Michel Kaempf (maxx@via.ecp.fr)
Mon, 12 Jul 1999 23:58:56 +0200


On Mon, Jul 12, 1999, Ghozlane Toumi wrote:
> for (i = 0 ; i < nr_swapfiles ; i++) {
> if (i == type)
> continue;
> if (p->swap_device == swap_info[i].swap_device)
> goto bad_swap;
> }
The 2.2.10 kernel corrects the oops your shell script triggers.

But the guilty lines were :
> for (i = 0 ; i < nr_swapfiles ; i++) {
> if (i == type)
> continue;
> if (swap_dentry->d_inode == swap_info[i].swap_file->d_inode)
> goto bad_swap;
> }

and were patched :
> for (i = 0 ; i < nr_swapfiles ; i++) {
> if (i == type || !swap_info[i].swap_file)
> continue;
> if (swap_dentry->d_inode == swap_info[i].swap_file->d_inode)
> goto bad_swap;
> }

-- 
MaXX

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/