[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210311111625.GA17025@lst.de>
Date: Thu, 11 Mar 2021 12:16:25 +0100
From: Christoph Hellwig <hch@....de>
To: gregkh@...uxfoundation.org
Cc: Christoph Hellwig <hch@....de>, Joel Becker <jlbec@...lplan.org>,
linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
Daniel Rosenberg <drosen@...gle.com>, stable@...r.kernel.org
Subject: Re: [PATCH] configfs: Fix config_item refcnt error in
__configfs_open_file()
I've actually just queued up a similar patch from Daiyue Zhang.
> - goto out_put_item;
> + goto out_put_module;
>
> if (type & CONFIGFS_ITEM_BIN_ATTR) {
> buffer->bin_attr = to_bin_attr(dentry);
> @@ -391,7 +391,7 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type
> /* Grab the module reference for this attribute if we have one */
> error = -ENODEV;
> if (!try_module_get(buffer->owner))
> - goto out_put_item;
> + goto out_put_module;
>
> error = -EACCES;
> if (!buffer->item->ci_type)
> @@ -435,8 +435,6 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type
>
> out_put_module:
> module_put(buffer->owner);
> -out_put_item:
> - config_item_put(buffer->item);
> out_free_buffer:
But the goto labe changes here look incorrect anyway, as they now introduce
a double put on the module..
Powered by blists - more mailing lists