Whamcloud - gitweb
5fdac4a93ca27ee8fe24a5fdb67c038f84340686
[fs/lustre-release.git] / libcfs / libcfs / module.c
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.gnu.org/licenses/gpl-2.0.html
19  *
20  * GPL HEADER END
21  */
22 /*
23  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Use is subject to license terms.
25  *
26  * Copyright (c) 2012, 2017, Intel Corporation.
27  */
28 /*
29  * This file is part of Lustre, http://www.lustre.org/
30  */
31 #include <linux/module.h>
32 #include <linux/kernel.h>
33 #include <linux/mm.h>
34 #include <linux/string.h>
35 #include <linux/stat.h>
36 #include <linux/errno.h>
37 #include <linux/unistd.h>
38 #include <net/sock.h>
39 #include <linux/uio.h>
40 #include <linux/uaccess.h>
41
42 #include <linux/fs.h>
43 #include <linux/file.h>
44 #include <linux/list.h>
45
46 #include <linux/sysctl.h>
47 #include <linux/debugfs.h>
48 #include <asm/div64.h>
49
50 #define DEBUG_SUBSYSTEM S_LNET
51
52 #include <libcfs/libcfs.h>
53 #include <libcfs/libcfs_crypto.h>
54 #include <lnet/lib-lnet.h>
55 #include <lustre_crypto.h>
56 #include "tracefile.h"
57
58 struct lnet_debugfs_symlink_def {
59         const char *name;
60         const char *target;
61 };
62
63 static struct dentry *lnet_debugfs_root;
64
65 int libcfs_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
66 {
67         switch (cmd) {
68         case IOC_LIBCFS_CLEAR_DEBUG:
69                 libcfs_debug_clear_buffer();
70                 break;
71         case IOC_LIBCFS_MARK_DEBUG:
72                 if (data == NULL ||
73                     data->ioc_inlbuf1 == NULL ||
74                     data->ioc_inlbuf1[data->ioc_inllen1 - 1] != '\0')
75                         return -EINVAL;
76
77                 libcfs_debug_mark_buffer(data->ioc_inlbuf1);
78                 break;
79
80         default:
81                 return -EINVAL;
82         }
83         return 0;
84 }
85 EXPORT_SYMBOL(libcfs_ioctl);
86
87 static int proc_dobitmasks(struct ctl_table *table, int write,
88                            void __user *buffer, size_t *lenp, loff_t *ppos)
89 {
90         const int     tmpstrlen = 512;
91         char         *tmpstr = NULL;
92         int           rc;
93         size_t nob = *lenp;
94         loff_t pos = *ppos;
95         unsigned int *mask = table->data;
96         int           is_subsys = (mask == &libcfs_subsystem_debug) ? 1 : 0;
97         int           is_printk = (mask == &libcfs_printk) ? 1 : 0;
98
99         if (!write) {
100                 tmpstr = kmalloc(tmpstrlen, GFP_KERNEL | __GFP_ZERO);
101                 if (!tmpstr)
102                         return -ENOMEM;
103                 libcfs_debug_mask2str(tmpstr, tmpstrlen, *mask, is_subsys);
104                 rc = strlen(tmpstr);
105
106                 if (pos >= rc) {
107                         rc = 0;
108                 } else {
109                         rc = cfs_trace_copyout_string(buffer, nob,
110                                                       tmpstr + pos, "\n");
111                 }
112         } else {
113                 tmpstr = memdup_user_nul(buffer, nob);
114                 if (IS_ERR(tmpstr))
115                         return PTR_ERR(tmpstr);
116
117                 rc = libcfs_debug_str2mask(mask, strim(tmpstr), is_subsys);
118                 /* Always print LBUG/LASSERT to console, so keep this mask */
119                 if (is_printk)
120                         *mask |= D_EMERG;
121         }
122
123         kfree(tmpstr);
124         return rc;
125 }
126
127 static int min_watchdog_ratelimit;              /* disable ratelimiting */
128 static int max_watchdog_ratelimit = (24*60*60); /* limit to once per day */
129
130 static int proc_dump_kernel(struct ctl_table *table, int write,
131                             void __user *buffer, size_t *lenp, loff_t *ppos)
132 {
133         size_t nob = *lenp;
134
135         if (!write)
136                 return 0;
137
138         return cfs_trace_dump_debug_buffer_usrstr(buffer, nob);
139 }
140
141 static int proc_daemon_file(struct ctl_table *table, int write,
142                             void __user *buffer, size_t *lenp, loff_t *ppos)
143 {
144         size_t nob = *lenp;
145         loff_t pos = *ppos;
146
147         if (!write) {
148                 int len = strlen(cfs_tracefile);
149
150                 if (pos >= len)
151                         return 0;
152
153                 return cfs_trace_copyout_string(buffer, nob,
154                                                 cfs_tracefile + pos, "\n");
155         }
156
157         return cfs_trace_daemon_command_usrstr(buffer, nob);
158 }
159
160 static int libcfs_force_lbug(struct ctl_table *table, int write,
161                              void __user *buffer,
162                              size_t *lenp, loff_t *ppos)
163 {
164         if (write)
165                 LBUG();
166         return 0;
167 }
168
169 static int proc_fail_loc(struct ctl_table *table, int write,
170                          void __user *buffer, size_t *lenp, loff_t *ppos)
171 {
172         int rc;
173         long old_fail_loc = cfs_fail_loc;
174
175         if (!*lenp || *ppos) {
176                 *lenp = 0;
177                 return 0;
178         }
179
180         if (write) {
181                 char *kbuf = memdup_user_nul(buffer, *lenp);
182
183                 if (IS_ERR(kbuf))
184                         return PTR_ERR(kbuf);
185                 rc = kstrtoul(kbuf, 0, &cfs_fail_loc);
186                 kfree(kbuf);
187                 *ppos += *lenp;
188         } else {
189                 char kbuf[64/3+3];
190
191                 rc = scnprintf(kbuf, sizeof(kbuf), "%lu\n", cfs_fail_loc);
192                 if (copy_to_user(buffer, kbuf, rc))
193                         rc = -EFAULT;
194                 else {
195                         *lenp = rc;
196                         *ppos += rc;
197                 }
198         }
199
200         if (old_fail_loc != cfs_fail_loc) {
201                 cfs_race_state = 1;
202                 wake_up(&cfs_race_waitq);
203         }
204         return rc;
205 }
206
207 int debugfs_doint(struct ctl_table *table, int write,
208                   void __user *buffer, size_t *lenp, loff_t *ppos)
209 {
210         int rc;
211
212         if (!*lenp || *ppos) {
213                 *lenp = 0;
214                 return 0;
215         }
216
217         if (write) {
218                 char *kbuf = memdup_user_nul(buffer, *lenp);
219                 int val;
220
221                 if (IS_ERR(kbuf))
222                         return PTR_ERR(kbuf);
223
224                 rc = kstrtoint(kbuf, 0, &val);
225                 kfree(kbuf);
226                 if (!rc) {
227                         if (table->extra1 && val < *(int *)table->extra1)
228                                 val = *(int *)table->extra1;
229                         if (table->extra2 && val > *(int *)table->extra2)
230                                 val = *(int *)table->extra2;
231                         *(int *)table->data = val;
232                 }
233                 *ppos += *lenp;
234         } else {
235                 char kbuf[64/3+3];
236
237                 rc = scnprintf(kbuf, sizeof(kbuf), "%u\n", *(int *)table->data);
238                 if (copy_to_user(buffer, kbuf, rc))
239                         rc = -EFAULT;
240                 else {
241                         *lenp = rc;
242                         *ppos += rc;
243                 }
244         }
245
246         return rc;
247 }
248 EXPORT_SYMBOL(debugfs_doint);
249
250 static int debugfs_dou64(struct ctl_table *table, int write,
251                          void __user *buffer, size_t *lenp, loff_t *ppos)
252 {
253         int rc;
254
255         if (!*lenp || *ppos) {
256                 *lenp = 0;
257                 return 0;
258         }
259
260         if (write) {
261                 char *kbuf = memdup_user_nul(buffer, *lenp);
262                 unsigned long long val;
263
264                 if (IS_ERR(kbuf))
265                         return PTR_ERR(kbuf);
266
267                 rc = kstrtoull(kbuf, 0, &val);
268                 kfree(kbuf);
269                 if (!rc)
270                         *(u64 *)table->data = val;
271                 *ppos += *lenp;
272         } else {
273                 char kbuf[64/3+3];
274
275                 rc = scnprintf(kbuf, sizeof(kbuf), "%llu\n",
276                                (unsigned long long)*(u64 *)table->data);
277                 if (copy_to_user(buffer, kbuf, rc))
278                         rc = -EFAULT;
279                 else {
280                         *lenp = rc;
281                         *ppos += rc;
282                 }
283         }
284
285         return rc;
286 }
287
288 static int debugfs_dostring(struct ctl_table *table, int write,
289                             void __user *buffer, size_t *lenp, loff_t *ppos)
290 {
291         int len = *lenp;
292         char *kbuf = table->data;
293
294         if (!len || *ppos) {
295                 *lenp = 0;
296                 return 0;
297         }
298         if (len > table->maxlen)
299                 len = table->maxlen;
300         if (write) {
301                 if (copy_from_user(kbuf, buffer, len))
302                         return -EFAULT;
303                 memset(kbuf+len, 0, table->maxlen - len);
304                 *ppos = *lenp;
305         } else {
306                 len = strnlen(kbuf, len);
307                 if (copy_to_user(buffer, kbuf, len))
308                         return -EFAULT;
309                 if (len < *lenp) {
310                         if (copy_to_user(buffer+len, "\n", 1))
311                                 return -EFAULT;
312                         len += 1;
313                 }
314                 *ppos += len;
315                 *lenp -= len;
316         }
317         return len;
318 }
319
320 static int proc_cpt_table(struct ctl_table *table, int write,
321                           void __user *buffer, size_t *lenp, loff_t *ppos)
322 {
323         size_t nob = *lenp;
324         loff_t pos = *ppos;
325         char *buf = NULL;
326         int   len = 4096;
327         int   rc  = 0;
328
329         if (write)
330                 return -EPERM;
331
332         while (1) {
333                 LIBCFS_ALLOC(buf, len);
334                 if (buf == NULL)
335                         return -ENOMEM;
336
337                 rc = cfs_cpt_table_print(cfs_cpt_tab, buf, len);
338                 if (rc >= 0)
339                         break;
340
341                 if (rc == -EFBIG) {
342                         LIBCFS_FREE(buf, len);
343                         len <<= 1;
344                         continue;
345                 }
346                 goto out;
347         }
348
349         if (pos >= rc) {
350                 rc = 0;
351                 goto out;
352         }
353
354         rc = cfs_trace_copyout_string(buffer, nob, buf + pos, NULL);
355 out:
356         if (buf != NULL)
357                 LIBCFS_FREE(buf, len);
358         return rc;
359 }
360
361 static int proc_cpt_distance(struct ctl_table *table, int write,
362                              void __user *buffer, size_t *lenp, loff_t *ppos)
363 {
364         size_t nob = *lenp;
365         loff_t pos = *ppos;
366         char *buf = NULL;
367         int   len = 4096;
368         int   rc  = 0;
369
370         if (write)
371                 return -EPERM;
372
373         while (1) {
374                 LIBCFS_ALLOC(buf, len);
375                 if (buf == NULL)
376                         return -ENOMEM;
377
378                 rc = cfs_cpt_distance_print(cfs_cpt_tab, buf, len);
379                 if (rc >= 0)
380                         break;
381
382                 if (rc == -EFBIG) {
383                         LIBCFS_FREE(buf, len);
384                         len <<= 1;
385                         continue;
386                 }
387                 goto out;
388         }
389
390         if (pos >= rc) {
391                 rc = 0;
392                 goto out;
393         }
394
395         rc = cfs_trace_copyout_string(buffer, nob, buf + pos, NULL);
396  out:
397         if (buf != NULL)
398                 LIBCFS_FREE(buf, len);
399         return rc;
400 }
401
402 static struct ctl_table lnet_table[] = {
403         {
404                 .procname       = "debug",
405                 .data           = &libcfs_debug,
406                 .maxlen         = sizeof(int),
407                 .mode           = 0644,
408                 .proc_handler   = &proc_dobitmasks,
409         },
410         {
411                 .procname       = "subsystem_debug",
412                 .data           = &libcfs_subsystem_debug,
413                 .maxlen         = sizeof(int),
414                 .mode           = 0644,
415                 .proc_handler   = &proc_dobitmasks,
416         },
417         {
418                 .procname       = "printk",
419                 .data           = &libcfs_printk,
420                 .maxlen         = sizeof(int),
421                 .mode           = 0644,
422                 .proc_handler   = &proc_dobitmasks,
423         },
424         {
425                 .procname       = "cpu_partition_table",
426                 .maxlen         = 128,
427                 .mode           = 0444,
428                 .proc_handler   = &proc_cpt_table,
429         },
430         {
431                 .procname       = "cpu_partition_distance",
432                 .maxlen         = 128,
433                 .mode           = 0444,
434                 .proc_handler   = &proc_cpt_distance,
435         },
436         {
437                 .procname       = "debug_log_upcall",
438                 .data           = lnet_debug_log_upcall,
439                 .maxlen         = sizeof(lnet_debug_log_upcall),
440                 .mode           = 0644,
441                 .proc_handler   = &debugfs_dostring,
442         },
443         {
444                 .procname       = "lnet_memused",
445                 .data           = (u64 *)&libcfs_kmem.counter,
446                 .maxlen         = sizeof(u64),
447                 .mode           = 0444,
448                 .proc_handler   = &debugfs_dou64,
449         },
450         {
451                 .procname       = "catastrophe",
452                 .data           = &libcfs_catastrophe,
453                 .maxlen         = sizeof(int),
454                 .mode           = 0444,
455                 .proc_handler   = &debugfs_doint,
456         },
457         {
458                 .procname       = "dump_kernel",
459                 .maxlen         = 256,
460                 .mode           = 0200,
461                 .proc_handler   = &proc_dump_kernel,
462         },
463         {
464                 .procname       = "daemon_file",
465                 .mode           = 0644,
466                 .maxlen         = 256,
467                 .proc_handler   = &proc_daemon_file,
468         },
469         {
470                 .procname       = "watchdog_ratelimit",
471                 .data           = &libcfs_watchdog_ratelimit,
472                 .maxlen         = sizeof(int),
473                 .mode           = 0644,
474                 .proc_handler   = &debugfs_doint,
475                 .extra1         = &min_watchdog_ratelimit,
476                 .extra2         = &max_watchdog_ratelimit,
477         },
478         {
479                 .procname       = "force_lbug",
480                 .data           = NULL,
481                 .maxlen         = 0,
482                 .mode           = 0200,
483                 .proc_handler   = &libcfs_force_lbug
484         },
485         {
486                 .procname       = "fail_loc",
487                 .data           = &cfs_fail_loc,
488                 .maxlen         = sizeof(cfs_fail_loc),
489                 .mode           = 0644,
490                 .proc_handler   = &proc_fail_loc
491         },
492         {
493                 .procname       = "fail_val",
494                 .data           = &cfs_fail_val,
495                 .maxlen         = sizeof(int),
496                 .mode           = 0644,
497                 .proc_handler   = &debugfs_doint
498         },
499         {
500                 .procname       = "fail_err",
501                 .data           = &cfs_fail_err,
502                 .maxlen         = sizeof(cfs_fail_err),
503                 .mode           = 0644,
504                 .proc_handler   = &debugfs_doint,
505         },
506         {
507         }
508 };
509
510 static const struct lnet_debugfs_symlink_def lnet_debugfs_symlinks[] = {
511         { .name         = "console_ratelimit",
512           .target       = "../../../module/libcfs/parameters/libcfs_console_ratelimit" },
513         { .name         = "debug_path",
514           .target       = "../../../module/libcfs/parameters/libcfs_debug_file_path" },
515         { .name         = "panic_on_lbug",
516           .target       = "../../../module/libcfs/parameters/libcfs_panic_on_lbug" },
517         { .name         = "console_backoff",
518           .target       = "../../../module/libcfs/parameters/libcfs_console_backoff" },
519         { .name         = "debug_mb",
520           .target       = "../../../module/libcfs/parameters/libcfs_debug_mb" },
521         { .name         = "console_min_delay_centisecs",
522           .target       = "../../../module/libcfs/parameters/libcfs_console_min_delay" },
523         { .name         = "console_max_delay_centisecs",
524           .target       = "../../../module/libcfs/parameters/libcfs_console_max_delay" },
525         { .name         = NULL },
526 };
527
528 static ssize_t lnet_debugfs_read(struct file *filp, char __user *buf,
529                                  size_t count, loff_t *ppos)
530 {
531         struct ctl_table *table = filp->private_data;
532         loff_t old_pos = *ppos;
533         ssize_t rc = -EINVAL;
534
535         if (table)
536                 rc = table->proc_handler(table, 0, (void __user *)buf,
537                                          &count, ppos);
538         /*
539          * On success, the length read is either in error or in count.
540          * If ppos changed, then use count, else use error
541          */
542         if (!rc && *ppos != old_pos)
543                 rc = count;
544         else if (rc > 0)
545                 *ppos += rc;
546
547         return rc;
548 }
549
550 static ssize_t lnet_debugfs_write(struct file *filp, const char __user *buf,
551                                   size_t count, loff_t *ppos)
552 {
553         struct ctl_table *table = filp->private_data;
554         loff_t old_pos = *ppos;
555         ssize_t rc = -EINVAL;
556
557         if (table)
558                 rc = table->proc_handler(table, 1, (void __user *)buf, &count,
559                                          ppos);
560         if (rc)
561                 return rc;
562
563         if (*ppos == old_pos)
564                 *ppos += count;
565
566         return count;
567 }
568
569 static const struct file_operations lnet_debugfs_file_operations_rw = {
570         .open           = simple_open,
571         .read           = lnet_debugfs_read,
572         .write          = lnet_debugfs_write,
573         .llseek         = default_llseek,
574 };
575
576 static const struct file_operations lnet_debugfs_file_operations_ro = {
577         .open           = simple_open,
578         .read           = lnet_debugfs_read,
579         .llseek         = default_llseek,
580 };
581
582 static const struct file_operations lnet_debugfs_file_operations_wo = {
583         .open           = simple_open,
584         .write          = lnet_debugfs_write,
585         .llseek         = default_llseek,
586 };
587
588 static const struct file_operations *lnet_debugfs_fops_select(
589         umode_t mode, const struct file_operations state[3])
590 {
591         if (!(mode & S_IWUGO))
592                 return &state[0];
593
594         if (!(mode & S_IRUGO))
595                 return &state[1];
596
597         return &state[2];
598 }
599
600 void lnet_insert_debugfs(struct ctl_table *table, struct module *mod,
601                          void **statep)
602 {
603         struct file_operations *state = *statep;
604         if (!lnet_debugfs_root)
605                 lnet_debugfs_root = debugfs_create_dir("lnet", NULL);
606
607         /* Even if we cannot create, just ignore it altogether) */
608         if (IS_ERR_OR_NULL(lnet_debugfs_root))
609                 return;
610
611         if (!state) {
612                 state = kmalloc(3 * sizeof(*state), GFP_KERNEL);
613                 if (!state)
614                         return;
615                 state[0] = lnet_debugfs_file_operations_ro;
616                 state[0].owner = mod;
617                 state[1] = lnet_debugfs_file_operations_wo;
618                 state[1].owner = mod;
619                 state[2] = lnet_debugfs_file_operations_rw;
620                 state[2].owner = mod;
621                 *statep = state;
622         }
623
624         /* We don't save the dentry returned in next two calls, because
625          * we don't call debugfs_remove() but rather remove_recursive()
626          */
627         for (; table && table->procname; table++)
628                 debugfs_create_file(table->procname, table->mode,
629                                     lnet_debugfs_root, table,
630                                     lnet_debugfs_fops_select(table->mode,
631                                                              (const struct file_operations *)state));
632 }
633 EXPORT_SYMBOL_GPL(lnet_insert_debugfs);
634
635 void lnet_debugfs_fini(void **state)
636 {
637         kfree(*state);
638         *state = NULL;
639 }
640 EXPORT_SYMBOL_GPL(lnet_debugfs_fini);
641
642 static void lnet_insert_debugfs_links(
643                 const struct lnet_debugfs_symlink_def *symlinks)
644 {
645         for (; symlinks && symlinks->name; symlinks++)
646                 debugfs_create_symlink(symlinks->name, lnet_debugfs_root,
647                                        symlinks->target);
648 }
649
650 void lnet_remove_debugfs(struct ctl_table *table)
651 {
652         for (; table && table->procname; table++) {
653                 struct qstr dname = QSTR_INIT(table->procname,
654                                               strlen(table->procname));
655                 struct dentry *dentry;
656
657                 dentry = d_hash_and_lookup(lnet_debugfs_root, &dname);
658                 debugfs_remove(dentry);
659         }
660 }
661 EXPORT_SYMBOL_GPL(lnet_remove_debugfs);
662
663 static void *debugfs_state;
664 static int __init libcfs_init(void)
665 {
666         int rc;
667
668         cfs_arch_init();
669
670         rc = libcfs_debug_init(5 * 1024 * 1024);
671         if (rc < 0) {
672                 pr_err("LustreError: libcfs_debug_init: rc = %d\n", rc);
673                 return (rc);
674         }
675
676         rc = cfs_cpu_init();
677         if (rc != 0)
678                 goto cleanup_debug;
679
680         cfs_rehash_wq = alloc_workqueue("cfs_rh", WQ_SYSFS, 4);
681         if (!cfs_rehash_wq) {
682                 rc = -ENOMEM;
683                 CERROR("libcfs: failed to start rehash workqueue: rc = %d\n",
684                        rc);
685                 goto cleanup_cpu;
686         }
687
688         rc = cfs_crypto_register();
689         if (rc) {
690                 CERROR("cfs_crypto_regster: error %d\n", rc);
691                 goto cleanup_cpu;
692         }
693
694         lnet_insert_debugfs(lnet_table, THIS_MODULE, &debugfs_state);
695         if (!IS_ERR_OR_NULL(lnet_debugfs_root))
696                 lnet_insert_debugfs_links(lnet_debugfs_symlinks);
697
698         rc = llcrypt_init();
699         if (rc) {
700                 CERROR("llcrypt_init: error %d\n", rc);
701                 goto cleanup_crypto;
702         }
703
704         CDEBUG(D_OTHER, "portals setup OK\n");
705         return 0;
706 cleanup_crypto:
707         cfs_crypto_unregister();
708 cleanup_cpu:
709         cfs_cpu_fini();
710 cleanup_debug:
711         libcfs_debug_cleanup();
712         return rc;
713 }
714
715 static void __exit libcfs_exit(void)
716 {
717         int rc;
718
719         /* Remove everthing */
720         debugfs_remove_recursive(lnet_debugfs_root);
721         lnet_debugfs_root = NULL;
722
723         lnet_debugfs_fini(&debugfs_state);
724
725         CDEBUG(D_MALLOC, "before Portals cleanup: kmem %lld\n",
726                libcfs_kmem_read());
727
728         llcrypt_exit();
729
730         if (cfs_rehash_wq) {
731                 destroy_workqueue(cfs_rehash_wq);
732                 cfs_rehash_wq = NULL;
733         }
734
735         cfs_crypto_unregister();
736
737         cfs_cpu_fini();
738
739         /* the below message is checked in test-framework.sh check_mem_leak() */
740         if (libcfs_kmem_read() != 0)
741                 CERROR("Portals memory leaked: %lld bytes\n",
742                        libcfs_kmem_read());
743
744         rc = libcfs_debug_cleanup();
745         if (rc)
746                 pr_err("LustreError: libcfs_debug_cleanup: rc = %d\n", rc);
747 }
748
749 MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
750 MODULE_DESCRIPTION("Lustre helper library");
751 MODULE_VERSION(LIBCFS_VERSION);
752 MODULE_LICENSE("GPL");
753
754 module_init(libcfs_init);
755 module_exit(libcfs_exit);