All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Dan Carpenter <error27@gmail.com>
Cc: autofs@linux.kernel.org, hpa@zytor.com
Subject: Re: [patch] unlock_kernel() in autofs
Date: Wed, 08 Apr 2009 14:40:31 +0800	[thread overview]
Message-ID: <49DC46DF.4080908@themaw.net> (raw)
In-Reply-To: <alpine.DEB.2.00.0904070829180.522@bicker>

Dan Carpenter wrote:
> There are a couple missing unlock_kernel() calls on error paths in autofs 
> version 2.6.29.

Hi Dan,

Thanks for your patch.

You may not be aware but the autofs4 kernel module may satisfy your
needs and it is actively maintained whereas I haven't been paying much
attention to the autofs module for some time now.

I plan on submitting patches to retire the autofs module sometime fairly
soon but haven't yet constructed a list of relevant maintainers to start
the awareness and discussion process.

Can you tell me in what environment you use the autofs kernel module?
Do you actually need to use autofs version 2 kernel communication protocol?
Have you checked to see if the autofs4 kernel module will satisfy your
needs?

> 
> Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

Source code analysis?
Is there a home page or download?

> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> --- orig/fs/autofs/root.c	2009-04-07 08:24:53.000000000 +0300
> +++ devel/fs/autofs/root.c	2009-04-07 08:27:35.000000000 +0300
> @@ -334,8 +334,10 @@
>  	autofs_hash_insert(dh,ent);
>  
>  	inode = autofs_iget(dir->i_sb, ent->ino);
> -	if (IS_ERR(inode))
> +	if (IS_ERR(inode)) {
> +		unlock_kernel();
>  		return PTR_ERR(inode);
> +	}
>  
>  	d_instantiate(dentry, inode);
>  	unlock_kernel();
> @@ -480,6 +482,7 @@
>  	inode = autofs_iget(dir->i_sb, ino);
>  	if (IS_ERR(inode)) {
>  		drop_nlink(dir);
> +		unlock_kernel();
>  		return PTR_ERR(inode);
>  	}
>  
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

  reply	other threads:[~2009-04-08  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07  7:53 [patch] unlock_kernel() in autofs Dan Carpenter
2009-04-08  6:40 ` Ian Kent [this message]
2009-04-08 13:00   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49DC46DF.4080908@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@linux.kernel.org \
    --cc=error27@gmail.com \
    --cc=hpa@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.