From: Stefano Garzarella <sgarzare@redhat.com> To: Mike Christie <michael.christie@oracle.com> Cc: brauner@kernel.org, mst@redhat.com, syzbot+6b27b2d2aba1c80cc13b@syzkaller.appspotmail.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, stefanha@redhat.com Subject: Re: [PATCH 1/1] vhost_task: Fix vhost_task_create return value Date: Thu, 23 Mar 2023 09:35:30 +0100 [thread overview] Message-ID: <20230323083530.6clofhwkixfkmvgw@sgarzare-redhat> (raw) In-Reply-To: <20230322185605.1307-1-michael.christie@oracle.com> 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 <michael.christie@oracle.com> >--- > kernel/vhost_task.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> > >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 > _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Stefano Garzarella <sgarzare@redhat.com> To: Mike Christie <michael.christie@oracle.com> 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 Date: Thu, 23 Mar 2023 09:35:30 +0100 [thread overview] Message-ID: <20230323083530.6clofhwkixfkmvgw@sgarzare-redhat> (raw) In-Reply-To: <20230322185605.1307-1-michael.christie@oracle.com> 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 <michael.christie@oracle.com> >--- > kernel/vhost_task.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> > >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 >
next prev parent reply other threads:[~2023-03-23 8:35 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-22 18:56 [PATCH 1/1] vhost_task: Fix vhost_task_create return value Mike Christie 2023-03-22 18:56 ` Mike Christie 2023-03-23 7:37 ` Michael S. Tsirkin 2023-03-23 7:37 ` Michael S. Tsirkin 2023-03-23 10:44 ` Christian Brauner 2023-03-23 11:43 ` Michael S. Tsirkin 2023-03-23 11:43 ` Michael S. Tsirkin 2023-03-23 11:50 ` Christian Brauner 2023-03-23 12:47 ` Michael S. Tsirkin 2023-03-23 12:47 ` Michael S. Tsirkin 2023-03-23 15:40 ` Mike Christie 2023-03-23 15:40 ` Mike Christie 2023-03-25 22:45 ` Mike Christie 2023-03-25 22:45 ` Mike Christie 2023-03-23 8:35 ` Stefano Garzarella [this message] 2023-03-23 8:35 ` Stefano Garzarella 2023-03-23 10:42 ` Christian Brauner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230323083530.6clofhwkixfkmvgw@sgarzare-redhat \ --to=sgarzare@redhat.com \ --cc=brauner@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michael.christie@oracle.com \ --cc=mst@redhat.com \ --cc=stefanha@redhat.com \ --cc=syzbot+6b27b2d2aba1c80cc13b@syzkaller.appspotmail.com \ --cc=virtualization@lists.linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.