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:	Sun, 11 Oct 2009 22:40:54 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Oliver Neukum <oliver@...kum.org>
Cc:	John Kacur <jkacur@...hat.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Jonathan Corbet <corbet@....net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Vincent^M^J Sanders <vince@...tec.co.uk>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] sound_core.c: Remove BKL from soundcore_open

On Sun, Oct 11, 2009 at 04:12:40PM +0200, Oliver Neukum wrote:
> Am Sonntag, 11. Oktober 2009 14:41:15 schrieb John Kacur:
> > @@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct
> > file *file) struct sound_unit *s;
> >         const struct file_operations *new_fops = NULL;
> >  
> > -       lock_kernel ();
> > -
> >         chain=unit&0x0F;
> >         if(chain==4 || chain==5)        /* dsp/audio/dsp16 */
> >         {
> > @@ -631,17 +629,17 @@ static int soundcore_open(struct inode *inode, struct
> > file *file) file->f_op = new_fops;
> >                 spin_unlock(&sound_loader_lock);
> >                 if(file->f_op->open)
> > +                       lock_kernel();
> >                         err = file->f_op->open(inode,file);
> > +                       unlock_kernel();
> >                 if (err) {
> >                         fops_put(file->f_op);
> >                         file->f_op = fops_get(old_fops);
> 
> Is that just me, or is file->f_op unguarded in this version?
> 
> 	Regards
> 		Oliver


Once assigned to file, the new fops won't move again.
And won't be freed until fops_put is called.

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