From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kinglong Mee Subject: [PATCH 1/5 v2] fs_pin: Fix uninitialized value in fs_pin Date: Sun, 24 May 2015 23:10:25 +0800 Message-ID: <5561E9E1.4070906@gmail.com> References: <5561E7E4.50604@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Trond Myklebust , Steve Dickson , kinglongmee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org To: "J. Bruce Fields" , Al Viro , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , NeilBrown Return-path: In-Reply-To: <5561E7E4.50604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org Without initialized, done in fs_pin at stack space may contains strange value. v2, same as v1. Signed-off-by: Kinglong Mee --- include/linux/fs_pin.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h index 3886b3b..0dde7b7 100644 --- a/include/linux/fs_pin.h +++ b/include/linux/fs_pin.h @@ -1,3 +1,6 @@ +#ifndef _LINUX_FS_PIN_H +#define _LINUX_FS_PIN_H + #include struct fs_pin { @@ -16,9 +19,12 @@ static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *)) INIT_HLIST_NODE(&p->s_list); INIT_HLIST_NODE(&p->m_list); p->kill = kill; + p->done = 0; } void pin_remove(struct fs_pin *); void pin_insert_group(struct fs_pin *, struct vfsmount *, struct hlist_head *); void pin_insert(struct fs_pin *, struct vfsmount *); void pin_kill(struct fs_pin *); + +#endif -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html