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]
Message-ID: <20061113230300.GA16571@kroah.com>
Date:	Mon, 13 Nov 2006 15:03:00 -0800
From:	Greg KH <greg@...ah.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	eric@...dington.net, Eric Buddington <ebuddington@...izon.net>,
	linux-kernel@...r.kernel.org, Kay Sievers <kay.sievers@...ell.com>,
	Jaroslav Kysela <perex@...e.cz>, Takashi Iwai <tiwai@...e.de>
Subject: Re: 2.6.19-rc4-mm2: BUG modprobeing sound driver

On Thu, Nov 09, 2006 at 10:28:29PM -0800, Andrew Morton wrote:
> On Thu, 9 Nov 2006 22:05:15 -0800
> Andrew Morton <akpm@...l.org> wrote:
> 
> > Yup, trivial to reproduce: modprobe snd_serial_u16550 -> splat.
> > 
> > Bisection indicates that this oops is triggered by
> > gregkh-driver-sound-device.patch.
> > 
> > snd_serial_probe() never got to call snd_card_register(), so card->dev is
> > NULL.
> > 
> > snd_serial_probe() calls snd_card_free(card) on the error path and
> > snd_card_do_free() does device_del(card->dev) which oopses over the null
> > pointer it got.  
> 
> I suppose doing this is legit:
> 
> diff -puN sound/core/init.c~fix-gregkh-driver-sound-device sound/core/init.c
> --- a/sound/core/init.c~fix-gregkh-driver-sound-device
> +++ a/sound/core/init.c
> @@ -361,7 +361,8 @@ static int snd_card_do_free(struct snd_c
>  		snd_printk(KERN_WARNING "unable to free card info\n");
>  		/* Not fatal error */
>  	}
> -	device_unregister(card->dev);
> +	if (card->dev)
> +		device_unregister(card->dev);
>  	kfree(card);
>  	return 0;
>  }

Good idea, I've made that change now to the sound code.

thanks,

greg k-h
-
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