]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
net accel: Prevent frontend network accelerator plugin loading in dom0
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 09:55:55 +0000 (09:55 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 09:55:55 +0000 (09:55 +0000)
Generate error if frontend plugin tries to connect on dom0

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
drivers/xen/netfront/accel.c

index d034b23369dc3fedfb5e78d54590f7995e035ed3..1a2b849c9e8765cd9870893c5d1e8753d9596a47 100644 (file)
@@ -446,6 +446,9 @@ int netfront_accelerator_loaded(int version, const char *frontend,
 {
        struct netfront_accelerator *accelerator;
 
+       if (is_initial_xendomain())
+               return -EINVAL;
+
        if (version != NETFRONT_ACCEL_VERSION) {
                if (version > NETFRONT_ACCEL_VERSION) {
                        /* Caller has higher version number, leave it