1. 22 Jul, 2009 2 commits
    • Jeff Layton's avatar
      cifs: fix sb->s_maxbytes so that it casts properly to a signed value · 03aa3a49
      Jeff Layton authored
      This off-by-one bug causes sendfile() to not work properly. When a task
      calls sendfile() on a file on a CIFS filesystem, the syscall returns -1
      and sets errno to EOVERFLOW.
      
      do_sendfile uses s_maxbytes to verify the returned offset of the file.
      The problem there is that this value is cast to a signed value (loff_t).
      When this is done on the s_maxbytes value that cifs uses, it becomes
      negative and the comparisons against it fail.
      
      Even though s_maxbytes is an unsigned value, it seems that it's not OK
      to set it in such a way that it'll end up negative when it's cast to a
      signed value. These casts happen in other codepaths besides sendfile
      too, but the VFS is a little hard to follow in this area and I can't
      be sure if there are other bugs that this will fix.
      
      It's not clear to me why s_maxbytes isn't just declared as loff_t in the
      first place, but either way we still need to fix these values to make
      sendfile work properly. This is also an opportunity to replace the magic
      bit-shift values here with the standard #defines for this.
      
      This fixes the reproducer program I have that does a sendfile and
      will probably also fix the situation where apache is serving from a
      CIFS share.
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      03aa3a49
    • Jeff Layton's avatar
      cifs: disable serverino if server doesn't support it · ce6e7fcd
      Jeff Layton authored
      A recent regression when dealing with older servers. This bug was
      introduced when we made serverino the default...
      
      When the server can't provide inode numbers, disable it for the mount.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      ce6e7fcd
  2. 20 Jul, 2009 10 commits
  3. 18 Jul, 2009 4 commits
  4. 17 Jul, 2009 23 commits
  5. 16 Jul, 2009 1 commit
    • Mike Frysinger's avatar
      Blackfin: define HARDIRQ_BITS again for now · 6843f405
      Mike Frysinger authored
      The default values of HARDIRQ_BITS and PREEMPT_BITS in common code leads to
      build failure:
      
      In file included from include/linux/interrupt.h:12,
                      from include/linux/kernel_stat.h:8,
                      from arch/blackfin/kernel/asm-offsets.c:32:
      include/linux/hardirq.h:66:2: error: #error PREEMPT_ACTIVE is too low!
      
      So until that gets resolved, just declare our own default value again.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      6843f405