* [PATCH] KVM: use a more sensible error number when debugfs directory creation fails
@ 2013-10-30 11:17 Paolo Bonzini
2013-10-30 11:20 ` Gleb Natapov
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2013-10-30 11:17 UTC (permalink / raw)
To: linux-kernel; +Cc: kvm, tim.gardner, gleb, torvalds
I don't know if this was due to cut and paste, or somebody was really
using a D20 to pick the error code for kvm_init_debugfs as suggested by
Linus (EFAULT is 14, so the possibility cannot be entirely ruled out).
In any case, this patch fixes it.
Reported-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
virt/kvm/kvm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index a9dd682cf5e3..1cf9ccb01013 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3091,7 +3091,7 @@ static const struct file_operations *stat_fops[] = {
static int kvm_init_debug(void)
{
- int r = -EFAULT;
+ int r = -EEXIST;
struct kvm_stats_debugfs_item *p;
kvm_debugfs_dir = debugfs_create_dir("kvm", NULL);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] KVM: use a more sensible error number when debugfs directory creation fails
2013-10-30 11:17 [PATCH] KVM: use a more sensible error number when debugfs directory creation fails Paolo Bonzini
@ 2013-10-30 11:20 ` Gleb Natapov
0 siblings, 0 replies; 2+ messages in thread
From: Gleb Natapov @ 2013-10-30 11:20 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: linux-kernel, kvm, tim.gardner, torvalds
On Wed, Oct 30, 2013 at 12:17:32PM +0100, Paolo Bonzini wrote:
> I don't know if this was due to cut and paste, or somebody was really
> using a D20 to pick the error code for kvm_init_debugfs as suggested by
> Linus (EFAULT is 14, so the possibility cannot be entirely ruled out).
>
Heh.
> In any case, this patch fixes it.
>
Acked-by: Gleb Natapov <gleb@redhat.com>
> Reported-by: Tim Gardner <tim.gardner@canonical.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> virt/kvm/kvm_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index a9dd682cf5e3..1cf9ccb01013 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -3091,7 +3091,7 @@ static const struct file_operations *stat_fops[] = {
>
> static int kvm_init_debug(void)
> {
> - int r = -EFAULT;
> + int r = -EEXIST;
> struct kvm_stats_debugfs_item *p;
>
> kvm_debugfs_dir = debugfs_create_dir("kvm", NULL);
> --
> 1.8.3.1
--
Gleb.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30 11:17 [PATCH] KVM: use a more sensible error number when debugfs directory creation fails Paolo Bonzini
2013-10-30 11:20 ` Gleb Natapov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox