X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-keyed-stream.c;h=5bce4315dc23ee52c27a9fac4f8a569896870968;hb=d0aa5bd27c22a33f04f47363910f9773fdeab7eb;hp=3b36d6a08d20fe621a7b5a1380828c0ce24eab51;hpb=5c40a15de52c320b70c94331e482b25fdcf768c4;p=palacios.git diff --git a/linux_module/iface-keyed-stream.c b/linux_module/iface-keyed-stream.c index 3b36d6a..5bce431 100644 --- a/linux_module/iface-keyed-stream.c +++ b/linux_module/iface-keyed-stream.c @@ -726,7 +726,7 @@ static v3_keyed_stream_t open_stream_file(char *url, de = lookup_create(&nd,1); - if (IS_ERR(de)) { + if (!de || IS_ERR(de)) { ERROR("cannot allocate dentry\n"); goto fail_out; } @@ -800,7 +800,7 @@ static v3_keyed_stream_key_t open_key_file(v3_keyed_stream_t stream, strcat(path,"/"); strcat(path,key); - fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream *)); + fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream)); if (!fs) { ERROR("cannot allocate file keyed stream for key %s\n",key); @@ -810,9 +810,9 @@ static v3_keyed_stream_key_t open_key_file(v3_keyed_stream_t stream, fs->stype=STREAM_FILE; - fs->f = filp_open(path,O_RDWR|O_CREAT,0600); - - if (IS_ERR(fs->f)) { + fs->f = filp_open(path,O_RDWR|O_CREAT|O_LARGEFILE,0600); + + if (!fs->f || IS_ERR(fs->f)) { ERROR("cannot open relevent file \"%s\" for stream \"file:%s\" and key \"%s\"\n",path,fks->path,key); palacios_free(fs); palacios_free(path); @@ -3177,6 +3177,7 @@ static int guest_init_keyed_streams(struct v3_guest * guest, void ** vm_data ) static int guest_deinit_keyed_streams(struct v3_guest * guest, void * vm_data) { + remove_guest_ctrl(guest, V3_VM_KSTREAM_USER_CONNECT); return 0; }