About this list Date view Thread view Subject view Author view Attachment view

From: uli (ulrich_at_wachtelnet.de)
Date: Sat 23 Oct 2004 - 18:06:15 BST


Hello all,

I got an patch error with patch patch-2.4.25-vs1.27-q0.14.diff in
file /fs/ioctctl.c. Attached the diff- file:

***************
*** 115,120 ****
                          else
                                  error = -ENOTTY;
                          break;
                  case FIOC_GETXFLG:
                  case FIOC_SETXFLG:
                          error = -ENOTTY;
--- 115,154 ----
                          else
                                  error = -ENOTTY;
                          break;
+ #ifndef CONFIG_INOXID_NONE
+ case FIOC_GETXID: {
+ struct inode *inode = filp->f_dentry->d_inode;
+
+ /* fixme: if stealth, return -ENOTTY */
+ error = -EPERM;
+ if (capable(CAP_CONTEXT))
+ error = put_user(inode->i_xid, (int *) arg);
+ break;
+ }
+ case FIOC_SETXID: {
+ struct inode *inode = filp->f_dentry->d_inode;
+ int xid;
+
+ /* fixme: if stealth, return -ENOTTY */
+ error = -EPERM;
+ if (!capable(CAP_CONTEXT))
+ break;
+ error = -EROFS;
+ if (IS_RDONLY(inode))
+ break;
+ error = -ENOSYS;
+ if (!(inode->i_sb->s_flags & MS_TAGXID))
+ break;
+ error = -EFAULT;
+ if (get_user(xid, (int *) arg))
+ break;
+ error = 0;
+ inode->i_xid = (xid & 0xFFFF);
+ inode->i_ctime = CURRENT_TIME;
+ mark_inode_dirty(inode);
+ break;
+ }
+ #endif
                  case FIOC_GETXFLG:
                  case FIOC_SETXFLG:
                          error = -ENOTTY;

The problem is that in ioctl after line 111 I see following:

                        else
                                error = -ENOTTY;
                        break;
                default:
                        error = -ENOTTY;
                        if (S_ISREG(filp->f_dentry->d_inode->i_mode))
                                error = file_ioctl(filp, cmd, arg);
                        else if (filp->f_op && filp->f_op->ioctl)
                                error = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
        }
        unlock_kernel();
        fput(filp);

out:
        return error;
}

But I see no lines:

                  case FIOC_GETXFLG:
                  case FIOC_SETXFLG:
                          error = -ENOTTY;

Any idea? I do not have any. I used kernel 2.4.25 directly from kernel.org.

U. Wachtel
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 23 Oct 2004 - 18:01:09 BST by hypermail 2.1.3