Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp953354pxx; Thu, 29 Oct 2020 20:04:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz28OoeusGLMeYSUhd5GkeMsRjUM83XwuKhKRYj4FtqvXhXBeo4JXATZ24PsU5VwhOQdG8w X-Received: by 2002:a17:906:4b12:: with SMTP id y18mr422902eju.533.1604027053700; Thu, 29 Oct 2020 20:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604027053; cv=none; d=google.com; s=arc-20160816; b=EgICFFLlVYaF4hLStWO3J37QgJVR8cGhd44Ts/LMhdjcYi4Qf6iCETLb5mN5+3mrGh j2Sw3IW621eF7owqaB797Nl1GdaeS5J3f/h/GFmYuHZaqEXWYWq8emUH21DR9l2zvimy pA9pERogydoQnHgo5epsu9FcsVDsNMsI9VGH93AeBt9hC92poT9NgQw0+x70DLeWGKOP oKjPiAAtEndpu6gZk6s5cNSw9dfGDcc7sHWdgx5TOOLQr4rg2dbgp9xtrIfGpoGB23Ne KLOk0YitJHf45H++JIY2zsE4wgP8+WK4H0e6g+WjB2f1tc5OdhgFSUcwW4WeZ5EnvH8a Y7Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=fKcuwvvBorNRKBWpha0nK9tUxipMZQxC+0DIRuUgHYA=; b=skyV39jhyXLeldkvn7z/3ZYpibzXwHJJtlOdOMnAMABscy9CBj1a6siuldk4y16WGy 3hh92u/Ebk8j5z+k/rcdDYlmT20kiLVUJWHqAg2c14wc979B++P0HkNOQt/7JlWb19CH iRjwFjogf8jiJlQp8pOYYf/T+Bjo+O60CZJMq4d0Jo1jjXfco//9IJihzqbCwxCD4zW9 rx3rBda7pJ9u4FdgVdjMYHPmXkQhOzoH3V51YSMTc1ut/mZWf27RTHH2unZIUm8XqtKH aGtYH3uS/HCTcheOr/F6+aeZCMneWFFBfKd6gUJ7zSt9vybxRusHMwgirZEiHOpvQCCq 0p8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si3579376edy.474.2020.10.29.20.03.51; Thu, 29 Oct 2020 20:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725963AbgJ3DCg (ORCPT + 99 others); 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-kernel@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.