Prev: [PATCH 5/5] score: Remove *(.text.*) pattern from the linker script
Next: [PATCH net-next-2.6] net: NET_SKB_PAD should depend on L1_CACHE_BYTES
From: Johannes Stezenbach on 14 Jun 2010 08:40 (forgot to add lkml to Cc) On Mon, Jun 14, 2010 at 01:02:52PM +0200, Johannes Stezenbach wrote: > Hi, > > in commit 19ba0559 the FIGETBSZ (and FS_IOC_FIEMAP) ioctl was moved > from file_ioctl() to do_vfs_ioctl(), so it also works for directories. > The problem I'm seeing is that FIGETBSZ is defined as _IO(0x00,2) > which is simply 2. so there is some potential for conflicts > with character devices which do not use the _IO macros for numbering > their ioctls. > Just doing a web search for "FIGETBSZ ioctl conflict" shows > that a few people already ran into this problem. > > Would you mind adding a check for S_ISDIR | S_ISREG, > or maybe !S_ISCHR? > > > Thanks, > Johannes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: tytso on 14 Jun 2010 09:50
On Mon, Jun 14, 2010 at 02:36:52PM +0200, Johannes Stezenbach wrote: > (forgot to add lkml to Cc) > > On Mon, Jun 14, 2010 at 01:02:52PM +0200, Johannes Stezenbach wrote: > > Hi, > > > > in commit 19ba0559 the FIGETBSZ (and FS_IOC_FIEMAP) ioctl was moved > > from file_ioctl() to do_vfs_ioctl(), so it also works for directories. > > The problem I'm seeing is that FIGETBSZ is defined as _IO(0x00,2) > > which is simply 2. so there is some potential for conflicts > > with character devices which do not use the _IO macros for numbering > > their ioctls. > > Just doing a web search for "FIGETBSZ ioctl conflict" shows > > that a few people already ran into this problem. > > > > Would you mind adding a check for S_ISDIR | S_ISREG, > > or maybe !S_ISCHR? Yeah, I think the right thing to do here is a check for S_ISDIR | S_ISREG | S_ISLNK. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |