Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7277861rwl; Thu, 23 Mar 2023 01:52:26 -0700 (PDT) X-Google-Smtp-Source: AK7set9lvfChM7kxSnHKOnFizPDCxJIIbogVCmzldF4D+vKpYhDJ1m7/hSh/mfePgM/wSuInty0W X-Received: by 2002:a17:906:c047:b0:932:615c:33d4 with SMTP id bm7-20020a170906c04700b00932615c33d4mr5064128ejb.34.1679561546418; Thu, 23 Mar 2023 01:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679561546; cv=none; d=google.com; s=arc-20160816; b=FZ4si/XuIvLRlAzybNdCoHEwr/ZrpCBIObxN6F4on3q2bYumNh8rhSOehkWwqvU5iu wSd7vpW3O6ihAShjx8sSFNqvPAAXIsfUOfSBz+bic6dyDnpEfcdzmdo+LIKJe/5ksHyQ wIVS87wyh3OrnWh+vdDOCQfHi6W9QvvVHwsQBud/x2DNxeumo8U38Q+x2ZNKFwJ4wC5M gkLroCwEzy8WNeb2wJ5nDgdtCkWpCuUE0RrjxtCcXmeRRlGwHtVEDPd7FnLg/Ewa5rtN AwxDARNRpSn/aQlTiGYH3oKMs09cWYEuIzmjgVxRCBAfFBARHWlYw2KSKq/RpiX7NiQU +2Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q2h2VoBtpKVUit8eaQH7nfWe6R/baAp4jt1GjEBXDY0=; b=Ad4dbNa9lM2K46mKvPmYggIBxFFymvw/0oEA7oxMkpZQqFm9iyH9fBheSvAlOib0Fs +O0aMyH4/EdsvaP+VdJE96AoshiqGcwoEgjhZD6tdBoTem1yIUFo3BKYsvNE3AVhJUFs aOE17N9iGLuRsSgfHbLQb+9Om2ZNvMRtrjK0Y1Atz2lcWs9XOZeM7ZsnymTHhaG8pWIN mvsZl43GLB5xbz/G8qbmXHEsm8aWq8IXYf9DLwxY2qESyzgKHE5wtDIMk668VHalaWwN 0d6qf63tytuJ5UjCv/iniJwU0edTSzwJFOQf7+1JVCZfky6tZI4EN1S3zwNEIuPLtiAD lL0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R2H3ksIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga25-20020a170906b85900b009272e9ad68fsi10448476ejb.548.2023.03.23.01.52.01; Thu, 23 Mar 2023 01:52:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R2H3ksIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbjCWIiU (ORCPT + 99 others); Thu, 23 Mar 2023 04:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbjCWIiA (ORCPT ); Thu, 23 Mar 2023 04:38:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323C812BE6 for ; Thu, 23 Mar 2023 01:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679560535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q2h2VoBtpKVUit8eaQH7nfWe6R/baAp4jt1GjEBXDY0=; b=R2H3ksIEiRbc2/07aCrRAJDR4KkJPpLpCazz0pDchHF8QEMDRchnugiqvnw3hi47V//t85 fBPzu4WUQpZLc5XqYAINS35TCO3nxXTEsktVDyrqdqc9BKjasCSYrfwgijrmo1ZDrfhNoC 1ao39RCnGdtXbgbfeOMZuJKhhic1xkw= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-2ATDj_GmNY6s1FAez6DU_w-1; Thu, 23 Mar 2023 04:35:34 -0400 X-MC-Unique: 2ATDj_GmNY6s1FAez6DU_w-1 Received: by mail-ed1-f69.google.com with SMTP id c1-20020a0564021f8100b004acbe232c03so30681226edc.9 for ; Thu, 23 Mar 2023 01:35:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679560533; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Q2h2VoBtpKVUit8eaQH7nfWe6R/baAp4jt1GjEBXDY0=; b=YNcYtIR1IEH9Seuin+gp4V+kbu4BuX5S85AJZa9EWJM4YLQ6cmLoc1i4UMuUSRZ1tL RiHCRVd7XIDSCruZLgM//k7om8Q17gNT2vDMzaERjrfoA9h8+g3aSCTr0jNY3z8UVa4O ordZAOBpEiL9YiqveRltsApD1Xgsc4rcQTJZODU9MHwdwlNFh9eSbUzUrykKEoL2GuAs L8hPbjgY+jlxfRZtqtTyHW/O8+Pls3UAWhtsZbJOkneYDnlekfrikxcpixp0g8bQlffF GMLYhJaz7degX0101YDbZdd1oW00CXgw+7OkYnE9NGmfQGtSZ6vBWQZTnppmAyB3t019 S04A== X-Gm-Message-State: AO0yUKUnpNFFl6ZRdX1+wdKY2iQlZut6cr5+GHCDwHrrtk1dIjIf1bzV OgzRZoIEjehoHPPnRYX1IQ01Ky6Rf74csXsrlGl6CU0IB2eqPIIkfWMIYgOsZdUms1nha9ctrsf 1tQqlsy7OANYljrj9/ajTA+A+ X-Received: by 2002:a17:907:8a1a:b0:920:7827:302 with SMTP id sc26-20020a1709078a1a00b0092078270302mr5999927ejc.18.1679560533390; Thu, 23 Mar 2023 01:35:33 -0700 (PDT) X-Received: by 2002:a17:907:8a1a:b0:920:7827:302 with SMTP id sc26-20020a1709078a1a00b0092078270302mr5999917ejc.18.1679560533151; Thu, 23 Mar 2023 01:35:33 -0700 (PDT) Received: from sgarzare-redhat (host-82-53-134-98.retail.telecomitalia.it. [82.53.134.98]) by smtp.gmail.com with ESMTPSA id jj19-20020a170907985300b008c327bef167sm8324109ejc.7.2023.03.23.01.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 01:35:32 -0700 (PDT) Date: Thu, 23 Mar 2023 09:35:30 +0100 From: Stefano Garzarella To: Mike Christie Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com, jasowang@redhat.com, stefanha@redhat.com, brauner@kernel.org, syzbot+6b27b2d2aba1c80cc13b@syzkaller.appspotmail.com Subject: Re: [PATCH 1/1] vhost_task: Fix vhost_task_create return value Message-ID: <20230323083530.6clofhwkixfkmvgw@sgarzare-redhat> References: <20230322185605.1307-1-michael.christie@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230322185605.1307-1-michael.christie@oracle.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2023 at 01:56:05PM -0500, Mike Christie wrote: >vhost_task_create is supposed to return the vhost_task or NULL on >failure. This fixes it to return the correct value when the allocation >of the struct fails. > >Fixes: 77feab3c4156 ("vhost_task: Allow vhost layer to use copy_process") # mainline only >Reported-by: syzbot+6b27b2d2aba1c80cc13b@syzkaller.appspotmail.com >Signed-off-by: Mike Christie >--- > kernel/vhost_task.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella > >diff --git a/kernel/vhost_task.c b/kernel/vhost_task.c >index 4b8aff160640..b7cbd66f889e 100644 >--- a/kernel/vhost_task.c >+++ b/kernel/vhost_task.c >@@ -88,7 +88,7 @@ struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, > > vtsk = kzalloc(sizeof(*vtsk), GFP_KERNEL); > if (!vtsk) >- return ERR_PTR(-ENOMEM); >+ return NULL; > init_completion(&vtsk->exited); > vtsk->data = arg; > vtsk->fn = fn; >-- >2.25.1 >