Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp539470pxx; Thu, 29 Oct 2020 08:29:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa0Cy1nqGGf7NlqmT5VAj1MMdJlMGlV2g3ZjWQvYEwgaa4nytJWg8PxiCaNtixqxs7hu8k X-Received: by 2002:aa7:d9ce:: with SMTP id v14mr4593354eds.203.1603985357587; Thu, 29 Oct 2020 08:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603985357; cv=none; d=google.com; s=arc-20160816; b=yi+VDQ/vhhWXQT7kKGj5F3FzJVJfXLCJLhQlr07rT24aG9Hut0mZ1hasO2tDr4UV/b adINwHL0yfnKljThs5fq4fTqMe7pzgPhY0xO4BbWRjyyxe4A3ZmY4oU1U4/ooztUl9lX pUsOMdpgX2EAyf9yfxJ/vkyFyeRu47RlVZqiCsmyhjiUzGkzbRvoyo/gy6uyoabDmKnR +67Mq7n5RSaUVcPSfgfJbsJA0WFgWOLUJtGltQ/xgzIOkxZzxsPvEoopjgPIHdB3rWr3 1AfR02TCI1XI+gur68Y9gEdRfRLfjeUzCgrufrZNz3/Zrj5Lr65ZoV8LhvzdXmOEKnFW A+xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TKA8BKb8i1utD9tGg1rDX3comc5+Hr03WuwdtvMqQLA=; b=OPwa+fgddq0hmvEZDX4LkypQiFLsdFdbVyx5NDSPzy3gJoQM1jl2GBjttH7vedJ3dC KbfNpJwoWaoYEsKl4uX/DkPedH1XJT5hmNYmO0qL3KA/VLIPqbOxnKkp9096CYxXIkf6 LhOYcYUCX5UtT2zpReMT8xZ/K6aM/Bh1qSs5AfrYfYBALmZD7ZN9gV5kJjVLClrMiEJg oM5ttw8H7zjXgUhDXczYDSEoE5F80Ynek1onn/txyG2FTflVMAkDKP6x2BxFQmm6Hi/R LVGEYKjlE2+hSRULUAVzU8okguT7U6x9nkghd+zBkDlXiLF0L2dkIfZLeOMhQiztxNNQ TjhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="Kp/b/eAo"; 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 pv12si1135123ejb.613.2020.10.29.08.28.53; Thu, 29 Oct 2020 08:29:17 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="Kp/b/eAo"; 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 S1728204AbgJ2P0A (ORCPT + 99 others); Thu, 29 Oct 2020 11:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbgJ2PZ7 (ORCPT ); Thu, 29 Oct 2020 11:25:59 -0400 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E761C0613D5 for ; Thu, 29 Oct 2020 08:25:59 -0700 (PDT) Received: by mail-vk1-xa42.google.com with SMTP id p16so775544vkf.13 for ; Thu, 29 Oct 2020 08:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TKA8BKb8i1utD9tGg1rDX3comc5+Hr03WuwdtvMqQLA=; b=Kp/b/eAolt5iKyiqV0LryXlku0eukwKvS7YYnx0Vu5M0emCJ0KYgTEIo704jzP4yyt OdLEOBhAqDfj091ssnVd8CGhjHebyVzGGApz5dLvDrsAooZmE/+AZKpFslKMMpUMMWac rsUGUV69EQoGuBDnMQVQktMf5j5std+OnmQ+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TKA8BKb8i1utD9tGg1rDX3comc5+Hr03WuwdtvMqQLA=; b=iiA9BeXDKxZKd0Jca7u1YB22TRw4luVebgSg60hfz2yDx89nEQWZj+XFnLBnm7hY+i i9ROXexuFes4cYsH94nMuCKHgQJG9KiIR8Kh4Ih1AgKFMDPIizdDC5rhTXA6UZNfTKjZ 7MvBz9lxfAdKGNzLtrVIGTmw3oCwU3hxWvZbgddyknHeiCo/NOOtuWLnfyfhtUh7qM+4 a9NvlsdyY6uivnYLhio8DaaE8dETXB7ZiBAcCfL4eDrzosLH4ILxxQ4jpMNJ9TY9CSam ctssIVMWSJreMhux2lQLWvfPgq6YLDqEd/L6RwWFOJ6xf9zQx/79uGszXw0h9jxoVSYj VnPw== X-Gm-Message-State: AOAM531ZuX0pIHHK02WNymsaxRSCgDAnefAQS4xsIHcm+iTOSvkXPNVS 9XwhwbNcl1wThdbYLuB8QZhqStLsPvZFZWAtTGwL1g== X-Received: by 2002:a1f:23d0:: with SMTP id j199mr3615428vkj.11.1603985158633; Thu, 29 Oct 2020 08:25:58 -0700 (PDT) MIME-Version: 1.0 References: <5e1bf70a-0c6b-89b6-dc9f-474ccfcfe597@huawei.com> In-Reply-To: <5e1bf70a-0c6b-89b6-dc9f-474ccfcfe597@huawei.com> From: Miklos Szeredi Date: Thu, 29 Oct 2020 16:25:47 +0100 Message-ID: Subject: Re: [PATCH] fuse: fix potential accessing NULL pointer problem in fuse_send_init() To: Zhiqiang Liu Cc: Miklos Szeredi , linfeilong , linux-fsdevel@vger.kernel.org, "linux-kernel@vger.kernel.org" , lihaotian Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, Miklos