From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A484C4363A for ; Fri, 30 Oct 2020 03:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E73D206C1 for ; Fri, 30 Oct 2020 03:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725831AbgJ3DCg (ORCPT ); Thu, 29 Oct 2020 23:02:36 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:6992 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbgJ3DCf (ORCPT ); Thu, 29 Oct 2020 23:02:35 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CMnC93vQrzhdTH; Fri, 30 Oct 2020 11:01:41 +0800 (CST) Received: from [127.0.0.1] (10.174.176.238) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 11:01:27 +0800 Subject: Re: [PATCH] fuse: fix potential accessing NULL pointer problem in fuse_send_init() To: Miklos Szeredi CC: Miklos Szeredi , linfeilong , , "linux-kernel@vger.kernel.org" , lihaotian References: <5e1bf70a-0c6b-89b6-dc9f-474ccfcfe597@huawei.com> From: Zhiqiang Liu Message-ID: Date: Fri, 30 Oct 2020 11:01:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.238] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 2020/10/29 23:25, Miklos Szeredi wrote: > On Thu, Oct 22, 2020 at 4:52 PM Zhiqiang Liu wrote: >> >> >> In fuse_send_init func, ia is allocated by calling kzalloc func, and >> we donot check whether ia is NULL before using it. Thus, if allocating >> ia fails, accessing NULL pointer problem will occur. > > Note the __GFP_NOFAIL flag for kzalloc(), which ensures that it will not fail. Thanks for your reply. Please ignore this patch.