lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mqueue: sys_mq_open: do not call mnt_drop_write() if read-only
On Tue, 19 Mar 2013 13:31:18 +0400 Vladimir Davydov <vdavydov@parallels.com> wrote:

> mnt_drop_write() must be called only if mnt_want_write() succeeded,
> otherwise the mnt_writers counter will diverge.
>
> ...
>
> --- a/ipc/mqueue.c
> +++ b/ipc/mqueue.c
> @@ -840,7 +840,8 @@ out_putfd:
> fd = error;
> }
> mutex_unlock(&root->d_inode->i_mutex);
> - mnt_drop_write(mnt);
> + if (!ro)
> + mnt_drop_write(mnt);
> out_putname:
> putname(name);
> return fd;

huh, that's been there for a while. What were the runtime-visible
effects of the bug?


\
 
 \ /
  Last update: 2013-03-19 22:41    [W:0.171 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site