inode.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. /* -*- linux-c -*- --------------------------------------------------------- *
  2. *
  3. * linux/fs/devpts/inode.c
  4. *
  5. * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
  6. *
  7. * This file is part of the Linux kernel and is made available under
  8. * the terms of the GNU General Public License, version 2, or at your
  9. * option, any later version, incorporated herein by reference.
  10. *
  11. * ------------------------------------------------------------------------- */
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/fs.h>
  15. #include <linux/sched.h>
  16. #include <linux/namei.h>
  17. #include <linux/mount.h>
  18. #include <linux/tty.h>
  19. #include <linux/mutex.h>
  20. #include <linux/idr.h>
  21. #include <linux/devpts_fs.h>
  22. #include <linux/parser.h>
  23. #include <linux/fsnotify.h>
  24. #include <linux/seq_file.h>
  25. #define DEVPTS_SUPER_MAGIC 0x1cd1
  26. #define DEVPTS_DEFAULT_MODE 0600
  27. /*
  28. * ptmx is a new node in /dev/pts and will be unused in legacy (single-
  29. * instance) mode. To prevent surprises in user space, set permissions of
  30. * ptmx to 0. Use 'chmod' or remount with '-o ptmxmode' to set meaningful
  31. * permissions.
  32. */
  33. #define DEVPTS_DEFAULT_PTMX_MODE 0000
  34. #define PTMX_MINOR 2
  35. extern int pty_limit; /* Config limit on Unix98 ptys */
  36. static DEFINE_MUTEX(allocated_ptys_lock);
  37. static struct vfsmount *devpts_mnt;
  38. struct pts_mount_opts {
  39. int setuid;
  40. int setgid;
  41. uid_t uid;
  42. gid_t gid;
  43. umode_t mode;
  44. umode_t ptmxmode;
  45. int newinstance;
  46. };
  47. enum {
  48. Opt_uid, Opt_gid, Opt_mode, Opt_ptmxmode, Opt_newinstance,
  49. Opt_err
  50. };
  51. static const match_table_t tokens = {
  52. {Opt_uid, "uid=%u"},
  53. {Opt_gid, "gid=%u"},
  54. {Opt_mode, "mode=%o"},
  55. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  56. {Opt_ptmxmode, "ptmxmode=%o"},
  57. {Opt_newinstance, "newinstance"},
  58. #endif
  59. {Opt_err, NULL}
  60. };
  61. struct pts_fs_info {
  62. struct ida allocated_ptys;
  63. struct pts_mount_opts mount_opts;
  64. struct dentry *ptmx_dentry;
  65. };
  66. static inline struct pts_fs_info *DEVPTS_SB(struct super_block *sb)
  67. {
  68. return sb->s_fs_info;
  69. }
  70. static inline struct super_block *pts_sb_from_inode(struct inode *inode)
  71. {
  72. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  73. if (inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC)
  74. return inode->i_sb;
  75. #endif
  76. return devpts_mnt->mnt_sb;
  77. }
  78. #define PARSE_MOUNT 0
  79. #define PARSE_REMOUNT 1
  80. static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts)
  81. {
  82. char *p;
  83. opts->setuid = 0;
  84. opts->setgid = 0;
  85. opts->uid = 0;
  86. opts->gid = 0;
  87. opts->mode = DEVPTS_DEFAULT_MODE;
  88. opts->ptmxmode = DEVPTS_DEFAULT_PTMX_MODE;
  89. /* newinstance makes sense only on initial mount */
  90. if (op == PARSE_MOUNT)
  91. opts->newinstance = 0;
  92. while ((p = strsep(&data, ",")) != NULL) {
  93. substring_t args[MAX_OPT_ARGS];
  94. int token;
  95. int option;
  96. if (!*p)
  97. continue;
  98. token = match_token(p, tokens, args);
  99. switch (token) {
  100. case Opt_uid:
  101. if (match_int(&args[0], &option))
  102. return -EINVAL;
  103. opts->uid = option;
  104. opts->setuid = 1;
  105. break;
  106. case Opt_gid:
  107. if (match_int(&args[0], &option))
  108. return -EINVAL;
  109. opts->gid = option;
  110. opts->setgid = 1;
  111. break;
  112. case Opt_mode:
  113. if (match_octal(&args[0], &option))
  114. return -EINVAL;
  115. opts->mode = option & S_IALLUGO;
  116. break;
  117. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  118. case Opt_ptmxmode:
  119. if (match_octal(&args[0], &option))
  120. return -EINVAL;
  121. opts->ptmxmode = option & S_IALLUGO;
  122. break;
  123. case Opt_newinstance:
  124. /* newinstance makes sense only on initial mount */
  125. if (op == PARSE_MOUNT)
  126. opts->newinstance = 1;
  127. break;
  128. #endif
  129. default:
  130. printk(KERN_ERR "devpts: called with bogus options\n");
  131. return -EINVAL;
  132. }
  133. }
  134. return 0;
  135. }
  136. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  137. static int mknod_ptmx(struct super_block *sb)
  138. {
  139. int mode;
  140. int rc = -ENOMEM;
  141. struct dentry *dentry;
  142. struct inode *inode;
  143. struct dentry *root = sb->s_root;
  144. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  145. struct pts_mount_opts *opts = &fsi->mount_opts;
  146. mutex_lock(&root->d_inode->i_mutex);
  147. /* If we have already created ptmx node, return */
  148. if (fsi->ptmx_dentry) {
  149. rc = 0;
  150. goto out;
  151. }
  152. dentry = d_alloc_name(root, "ptmx");
  153. if (!dentry) {
  154. printk(KERN_NOTICE "Unable to alloc dentry for ptmx node\n");
  155. goto out;
  156. }
  157. /*
  158. * Create a new 'ptmx' node in this mount of devpts.
  159. */
  160. inode = new_inode(sb);
  161. if (!inode) {
  162. printk(KERN_ERR "Unable to alloc inode for ptmx node\n");
  163. dput(dentry);
  164. goto out;
  165. }
  166. inode->i_ino = 2;
  167. inode->i_uid = inode->i_gid = 0;
  168. inode->i_blocks = 0;
  169. inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  170. mode = S_IFCHR|opts->ptmxmode;
  171. init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2));
  172. d_add(dentry, inode);
  173. fsi->ptmx_dentry = dentry;
  174. rc = 0;
  175. printk(KERN_DEBUG "Created ptmx node in devpts ino %lu\n",
  176. inode->i_ino);
  177. out:
  178. mutex_unlock(&root->d_inode->i_mutex);
  179. return rc;
  180. }
  181. static void update_ptmx_mode(struct pts_fs_info *fsi)
  182. {
  183. struct inode *inode;
  184. if (fsi->ptmx_dentry) {
  185. inode = fsi->ptmx_dentry->d_inode;
  186. inode->i_mode = S_IFCHR|fsi->mount_opts.ptmxmode;
  187. }
  188. }
  189. #else
  190. static inline void update_ptmx_mode(struct pts_fs_info *fsi)
  191. {
  192. return;
  193. }
  194. #endif
  195. static int devpts_remount(struct super_block *sb, int *flags, char *data)
  196. {
  197. int err;
  198. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  199. struct pts_mount_opts *opts = &fsi->mount_opts;
  200. err = parse_mount_options(data, PARSE_REMOUNT, opts);
  201. /*
  202. * parse_mount_options() restores options to default values
  203. * before parsing and may have changed ptmxmode. So, update the
  204. * mode in the inode too. Bogus options don't fail the remount,
  205. * so do this even on error return.
  206. */
  207. update_ptmx_mode(fsi);
  208. return err;
  209. }
  210. static int devpts_show_options(struct seq_file *seq, struct vfsmount *vfs)
  211. {
  212. struct pts_fs_info *fsi = DEVPTS_SB(vfs->mnt_sb);
  213. struct pts_mount_opts *opts = &fsi->mount_opts;
  214. if (opts->setuid)
  215. seq_printf(seq, ",uid=%u", opts->uid);
  216. if (opts->setgid)
  217. seq_printf(seq, ",gid=%u", opts->gid);
  218. seq_printf(seq, ",mode=%03o", opts->mode);
  219. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  220. seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode);
  221. #endif
  222. return 0;
  223. }
  224. static const struct super_operations devpts_sops = {
  225. .statfs = simple_statfs,
  226. .remount_fs = devpts_remount,
  227. .show_options = devpts_show_options,
  228. };
  229. static void *new_pts_fs_info(void)
  230. {
  231. struct pts_fs_info *fsi;
  232. fsi = kzalloc(sizeof(struct pts_fs_info), GFP_KERNEL);
  233. if (!fsi)
  234. return NULL;
  235. ida_init(&fsi->allocated_ptys);
  236. fsi->mount_opts.mode = DEVPTS_DEFAULT_MODE;
  237. fsi->mount_opts.ptmxmode = DEVPTS_DEFAULT_PTMX_MODE;
  238. return fsi;
  239. }
  240. static int
  241. devpts_fill_super(struct super_block *s, void *data, int silent)
  242. {
  243. struct inode *inode;
  244. s->s_blocksize = 1024;
  245. s->s_blocksize_bits = 10;
  246. s->s_magic = DEVPTS_SUPER_MAGIC;
  247. s->s_op = &devpts_sops;
  248. s->s_time_gran = 1;
  249. s->s_fs_info = new_pts_fs_info();
  250. if (!s->s_fs_info)
  251. goto fail;
  252. inode = new_inode(s);
  253. if (!inode)
  254. goto free_fsi;
  255. inode->i_ino = 1;
  256. inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  257. inode->i_blocks = 0;
  258. inode->i_uid = inode->i_gid = 0;
  259. inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
  260. inode->i_op = &simple_dir_inode_operations;
  261. inode->i_fop = &simple_dir_operations;
  262. inode->i_nlink = 2;
  263. s->s_root = d_alloc_root(inode);
  264. if (s->s_root)
  265. return 0;
  266. printk(KERN_ERR "devpts: get root dentry failed\n");
  267. iput(inode);
  268. free_fsi:
  269. kfree(s->s_fs_info);
  270. fail:
  271. return -ENOMEM;
  272. }
  273. #ifdef CONFIG_DEVPTS_MULTIPLE_INSTANCES
  274. static int compare_init_pts_sb(struct super_block *s, void *p)
  275. {
  276. if (devpts_mnt)
  277. return devpts_mnt->mnt_sb == s;
  278. return 0;
  279. }
  280. /*
  281. * Safely parse the mount options in @data and update @opts.
  282. *
  283. * devpts ends up parsing options two times during mount, due to the
  284. * two modes of operation it supports. The first parse occurs in
  285. * devpts_get_sb() when determining the mode (single-instance or
  286. * multi-instance mode). The second parse happens in devpts_remount()
  287. * or new_pts_mount() depending on the mode.
  288. *
  289. * Parsing of options modifies the @data making subsequent parsing
  290. * incorrect. So make a local copy of @data and parse it.
  291. *
  292. * Return: 0 On success, -errno on error
  293. */
  294. static int safe_parse_mount_options(void *data, struct pts_mount_opts *opts)
  295. {
  296. int rc;
  297. void *datacp;
  298. if (!data)
  299. return 0;
  300. /* Use kstrdup() ? */
  301. datacp = kmalloc(PAGE_SIZE, GFP_KERNEL);
  302. if (!datacp)
  303. return -ENOMEM;
  304. memcpy(datacp, data, PAGE_SIZE);
  305. rc = parse_mount_options((char *)datacp, PARSE_MOUNT, opts);
  306. kfree(datacp);
  307. return rc;
  308. }
  309. /*
  310. * Mount a new (private) instance of devpts. PTYs created in this
  311. * instance are independent of the PTYs in other devpts instances.
  312. */
  313. static int new_pts_mount(struct file_system_type *fs_type, int flags,
  314. void *data, struct vfsmount *mnt)
  315. {
  316. int err;
  317. struct pts_fs_info *fsi;
  318. struct pts_mount_opts *opts;
  319. printk(KERN_NOTICE "devpts: newinstance mount\n");
  320. err = get_sb_nodev(fs_type, flags, data, devpts_fill_super, mnt);
  321. if (err)
  322. return err;
  323. fsi = DEVPTS_SB(mnt->mnt_sb);
  324. opts = &fsi->mount_opts;
  325. err = parse_mount_options(data, PARSE_MOUNT, opts);
  326. if (err)
  327. goto fail;
  328. err = mknod_ptmx(mnt->mnt_sb);
  329. if (err)
  330. goto fail;
  331. return 0;
  332. fail:
  333. dput(mnt->mnt_sb->s_root);
  334. deactivate_super(mnt->mnt_sb);
  335. return err;
  336. }
  337. /*
  338. * Check if 'newinstance' mount option was specified in @data.
  339. *
  340. * Return: -errno on error (eg: invalid mount options specified)
  341. * : 1 if 'newinstance' mount option was specified
  342. * : 0 if 'newinstance' mount option was NOT specified
  343. */
  344. static int is_new_instance_mount(void *data)
  345. {
  346. int rc;
  347. struct pts_mount_opts opts;
  348. if (!data)
  349. return 0;
  350. rc = safe_parse_mount_options(data, &opts);
  351. if (!rc)
  352. rc = opts.newinstance;
  353. return rc;
  354. }
  355. /*
  356. * get_init_pts_sb()
  357. *
  358. * This interface is needed to support multiple namespace semantics in
  359. * devpts while preserving backward compatibility of the current 'single-
  360. * namespace' semantics. i.e all mounts of devpts without the 'newinstance'
  361. * mount option should bind to the initial kernel mount, like
  362. * get_sb_single().
  363. *
  364. * Mounts with 'newinstance' option create a new private namespace.
  365. *
  366. * But for single-mount semantics, devpts cannot use get_sb_single(),
  367. * because get_sb_single()/sget() find and use the super-block from
  368. * the most recent mount of devpts. But that recent mount may be a
  369. * 'newinstance' mount and get_sb_single() would pick the newinstance
  370. * super-block instead of the initial super-block.
  371. *
  372. * This interface is identical to get_sb_single() except that it
  373. * consistently selects the 'single-namespace' superblock even in the
  374. * presence of the private namespace (i.e 'newinstance') super-blocks.
  375. */
  376. static int get_init_pts_sb(struct file_system_type *fs_type, int flags,
  377. void *data, struct vfsmount *mnt)
  378. {
  379. struct super_block *s;
  380. int error;
  381. s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL);
  382. if (IS_ERR(s))
  383. return PTR_ERR(s);
  384. if (!s->s_root) {
  385. s->s_flags = flags;
  386. error = devpts_fill_super(s, data, flags & MS_SILENT ? 1 : 0);
  387. if (error) {
  388. up_write(&s->s_umount);
  389. deactivate_super(s);
  390. return error;
  391. }
  392. s->s_flags |= MS_ACTIVE;
  393. }
  394. do_remount_sb(s, flags, data, 0);
  395. return simple_set_mnt(mnt, s);
  396. }
  397. /*
  398. * Mount or remount the initial kernel mount of devpts. This type of
  399. * mount maintains the legacy, single-instance semantics, while the
  400. * kernel still allows multiple-instances.
  401. */
  402. static int init_pts_mount(struct file_system_type *fs_type, int flags,
  403. void *data, struct vfsmount *mnt)
  404. {
  405. int err;
  406. err = get_init_pts_sb(fs_type, flags, data, mnt);
  407. if (err)
  408. return err;
  409. err = mknod_ptmx(mnt->mnt_sb);
  410. if (err) {
  411. dput(mnt->mnt_sb->s_root);
  412. deactivate_super(mnt->mnt_sb);
  413. }
  414. return err;
  415. }
  416. static int devpts_get_sb(struct file_system_type *fs_type,
  417. int flags, const char *dev_name, void *data, struct vfsmount *mnt)
  418. {
  419. int new;
  420. new = is_new_instance_mount(data);
  421. if (new < 0)
  422. return new;
  423. if (new)
  424. return new_pts_mount(fs_type, flags, data, mnt);
  425. return init_pts_mount(fs_type, flags, data, mnt);
  426. }
  427. #else
  428. /*
  429. * This supports only the legacy single-instance semantics (no
  430. * multiple-instance semantics)
  431. */
  432. static int devpts_get_sb(struct file_system_type *fs_type, int flags,
  433. const char *dev_name, void *data, struct vfsmount *mnt)
  434. {
  435. return get_sb_single(fs_type, flags, data, devpts_fill_super, mnt);
  436. }
  437. #endif
  438. static void devpts_kill_sb(struct super_block *sb)
  439. {
  440. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  441. kfree(fsi);
  442. kill_litter_super(sb);
  443. }
  444. static struct file_system_type devpts_fs_type = {
  445. .owner = THIS_MODULE,
  446. .name = "devpts",
  447. .get_sb = devpts_get_sb,
  448. .kill_sb = devpts_kill_sb,
  449. };
  450. /*
  451. * The normal naming convention is simply /dev/pts/<number>; this conforms
  452. * to the System V naming convention
  453. */
  454. int devpts_new_index(struct inode *ptmx_inode)
  455. {
  456. struct super_block *sb = pts_sb_from_inode(ptmx_inode);
  457. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  458. int index;
  459. int ida_ret;
  460. retry:
  461. if (!ida_pre_get(&fsi->allocated_ptys, GFP_KERNEL))
  462. return -ENOMEM;
  463. mutex_lock(&allocated_ptys_lock);
  464. ida_ret = ida_get_new(&fsi->allocated_ptys, &index);
  465. if (ida_ret < 0) {
  466. mutex_unlock(&allocated_ptys_lock);
  467. if (ida_ret == -EAGAIN)
  468. goto retry;
  469. return -EIO;
  470. }
  471. if (index >= pty_limit) {
  472. ida_remove(&fsi->allocated_ptys, index);
  473. mutex_unlock(&allocated_ptys_lock);
  474. return -EIO;
  475. }
  476. mutex_unlock(&allocated_ptys_lock);
  477. return index;
  478. }
  479. void devpts_kill_index(struct inode *ptmx_inode, int idx)
  480. {
  481. struct super_block *sb = pts_sb_from_inode(ptmx_inode);
  482. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  483. mutex_lock(&allocated_ptys_lock);
  484. ida_remove(&fsi->allocated_ptys, idx);
  485. mutex_unlock(&allocated_ptys_lock);
  486. }
  487. int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
  488. {
  489. /* tty layer puts index from devpts_new_index() in here */
  490. int number = tty->index;
  491. struct tty_driver *driver = tty->driver;
  492. dev_t device = MKDEV(driver->major, driver->minor_start+number);
  493. struct dentry *dentry;
  494. struct super_block *sb = pts_sb_from_inode(ptmx_inode);
  495. struct inode *inode = new_inode(sb);
  496. struct dentry *root = sb->s_root;
  497. struct pts_fs_info *fsi = DEVPTS_SB(sb);
  498. struct pts_mount_opts *opts = &fsi->mount_opts;
  499. char s[12];
  500. /* We're supposed to be given the slave end of a pty */
  501. BUG_ON(driver->type != TTY_DRIVER_TYPE_PTY);
  502. BUG_ON(driver->subtype != PTY_TYPE_SLAVE);
  503. if (!inode)
  504. return -ENOMEM;
  505. inode->i_ino = number + 3;
  506. inode->i_uid = opts->setuid ? opts->uid : current_fsuid();
  507. inode->i_gid = opts->setgid ? opts->gid : current_fsgid();
  508. inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  509. init_special_inode(inode, S_IFCHR|opts->mode, device);
  510. inode->i_private = tty;
  511. tty->driver_data = inode;
  512. sprintf(s, "%d", number);
  513. mutex_lock(&root->d_inode->i_mutex);
  514. dentry = d_alloc_name(root, s);
  515. if (!IS_ERR(dentry)) {
  516. d_add(dentry, inode);
  517. fsnotify_create(root->d_inode, dentry);
  518. }
  519. mutex_unlock(&root->d_inode->i_mutex);
  520. return 0;
  521. }
  522. struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
  523. {
  524. BUG_ON(pts_inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR));
  525. if (pts_inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC)
  526. return (struct tty_struct *)pts_inode->i_private;
  527. return NULL;
  528. }
  529. void devpts_pty_kill(struct tty_struct *tty)
  530. {
  531. struct inode *inode = tty->driver_data;
  532. struct super_block *sb = pts_sb_from_inode(inode);
  533. struct dentry *root = sb->s_root;
  534. struct dentry *dentry;
  535. BUG_ON(inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR));
  536. mutex_lock(&root->d_inode->i_mutex);
  537. dentry = d_find_alias(inode);
  538. if (IS_ERR(dentry))
  539. goto out;
  540. if (dentry) {
  541. inode->i_nlink--;
  542. d_delete(dentry);
  543. dput(dentry); /* d_alloc_name() in devpts_pty_new() */
  544. }
  545. dput(dentry); /* d_find_alias above */
  546. out:
  547. mutex_unlock(&root->d_inode->i_mutex);
  548. }
  549. static int __init init_devpts_fs(void)
  550. {
  551. int err = register_filesystem(&devpts_fs_type);
  552. if (!err) {
  553. devpts_mnt = kern_mount(&devpts_fs_type);
  554. if (IS_ERR(devpts_mnt))
  555. err = PTR_ERR(devpts_mnt);
  556. }
  557. return err;
  558. }
  559. static void __exit exit_devpts_fs(void)
  560. {
  561. unregister_filesystem(&devpts_fs_type);
  562. mntput(devpts_mnt);
  563. }
  564. module_init(init_devpts_fs)
  565. module_exit(exit_devpts_fs)
  566. MODULE_LICENSE("GPL");