Re: [PATCH] Do not segfault because of kernel version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luk Claes wrote:

  On 07/03/2011 04:11 PM, Jim Rees wrote:
  > Luk Claes wrote:
  > 
  >   > Yes, just return UINT_MAX.  Fix the other error return too, the one where
  >   > uname fails.  And put in a comment if you can briefly summarize Linus's
  >   > argument.
  >   
  >   I thought that a real error like uname failing should still get the
  >   'wrong' return 0, no?
  > 
  > No.  As I read it, Linus argues that you should only run the backward
  > compatibility code path when you know you're running an older kernel.  If
  > you don't know, then you should assume you're running a newer kernel.
  
  So, if uname fails we treat it as a newer kernel, shouldn't we treat
  that as an error?

That would seem wrong to me.  The current code does not treat it as an
error, so we're breaking something that used to work.  And failing the mount
because uname won't run seems unreasonable.  That could happen at the worst
possible time, for example on a system where the local disk has become
corrupt and you're fixing it from a rescue CD.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux