login
Header Space

 
 

Re: [PATCH 2/4] power_supply: add eeprom dump file to olpc_battery's sysfs

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andres Salomon <dilinger@...>
Cc: <cbou@...>, <linux-kernel@...>, <dwmw2@...>
Date: Wednesday, April 30, 2008 - 5:53 pm

On Wed, 30 Apr 2008 16:30:08 -0400
Andres Salomon <dilinger@queued.net> wrote:


loff_t is signed.

Happily, the VFS prevents negative loff_t's from being passed into read()
handlers.


But the vfs doesn't check for (offset+len) going negative (I think?)

However you got lucky (or smart ;)) - size_t is unsigned so the comparison
will dtrt.

Plus the first `if' will prevent us getting here with huge-nearly-negative
`off'.

This stuff is harder than it should be :(

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/4] power_supply: add eeprom dump file to olpc_b..., Andrew Morton, (Wed Apr 30, 5:53 pm)
speck-geostationary