Driver porting: The seq_file interface
Posted Nov 15, 2003 1:53 UTC (Sat) by giraffedata
In reply to: Driver porting: The seq_file interface
Parent article: Driver porting: The seq_file interface
I am now kfree()ing in ct_seq_next(), just before it returns with NULL at the end of the table
Seems like that would be a problem if the user chooses not to read all the way to EOF.
This just sounds like a basic bug in the seq_file interface. If ct_seq_start() fails, it should be ct_seq_start's responsibility to not change any state, and thus ct_seq_stop doesn't need to be, and should not be, called. After all, does a POSIX program call close(-1) when open() fails?
to post comments)