From patchwork Tue Apr 28 16:10:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 6290981 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E8089F389 for ; Tue, 28 Apr 2015 16:10:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A66AA20220 for ; Tue, 28 Apr 2015 16:10:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0AA42021F for ; Tue, 28 Apr 2015 16:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965853AbbD1QKM (ORCPT ); Tue, 28 Apr 2015 12:10:12 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34511 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965836AbbD1QKL (ORCPT ); Tue, 28 Apr 2015 12:10:11 -0400 Received: by pablf10 with SMTP id lf10so46030210pab.1 for ; Tue, 28 Apr 2015 09:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=lgbE9FEfbE1VEgmA46fCa4HpXvnORBl8bJJqtr4sD/4=; b=nz3PQBDEknjM1prF8EOwrx0Ajmd7uAnO3rqFu51oXO3gePUWzonMNwcQrFrQuymK3P pIn8/p7vg3MTFsbK9LojKzdaKnhE5UqRoSvusc0ebX6urtOhDVOBt+lj8BcvMlAG51X+ A7NnK2OHSm8EPQEUz4zskL4Z96E92fqUSlTI2tdz93QRKbGGyx+izIAJF74TLg791pkR LEjUZ9xBYxfn1gKeZv70ObWuxYXFegG3A7oyxe+SHxjoqicOQIilExVSCCX0JMfdPYZM KpPjqcKBYpbMh5MFFnfrN3EkJRaKbo9WTw3Sg+5IphVUfEnLDSkMWFQ0LFarIzS5dlfs z1rw== X-Received: by 10.66.120.99 with SMTP id lb3mr14020829pab.17.1430237411414; Tue, 28 Apr 2015 09:10:11 -0700 (PDT) Received: from [192.168.99.5] ([104.143.41.79]) by mx.google.com with ESMTPSA id y4sm22909717pdm.9.2015.04.28.09.10.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 09:10:09 -0700 (PDT) Message-ID: <553FB0DD.2040203@gmail.com> Date: Wed, 29 Apr 2015 00:10:05 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Al Viro CC: linux-fsdevel@vger.kernel.org, kinglongmee@gmail.com Subject: [PATCH] fs_pin: Initialize done to 0 avoiding strange value Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without initialized, fs_pin in stack space may contains strange values. Signed-off-by: Kinglong Mee --- include/linux/fs_pin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h index 3886b3b..18fad53 100644 --- a/include/linux/fs_pin.h +++ b/include/linux/fs_pin.h @@ -16,6 +16,7 @@ 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 *);