Re: [PATCH -next 2/3] batman-adv: Use seq_overflow

2013-12-11 Thread Al Viro
On Wed, Dec 11, 2013 at 12:26:17AM -0800, Joe Perches wrote: > On Wed, 2013-12-11 at 08:05 +, Al Viro wrote: > > On Wed, Dec 11, 2013 at 07:55:26AM +, Al Viro wrote: > > > > > This sucker should return 0. Insufficiently large buffer will be handled > > > by caller, TYVM, if you give that

Re: [PATCH -next 2/3] batman-adv: Use seq_overflow

2013-12-11 Thread Joe Perches
On Wed, 2013-12-11 at 08:05 +, Al Viro wrote: > On Wed, Dec 11, 2013 at 07:55:26AM +, Al Viro wrote: > > > This sucker should return 0. Insufficiently large buffer will be handled > > by caller, TYVM, if you give that caller a chance to do so. Returning 1 > > from ->show() is a bug in al

Re: [PATCH -next 2/3] batman-adv: Use seq_overflow

2013-12-11 Thread Al Viro
On Wed, Dec 11, 2013 at 07:55:26AM +, Al Viro wrote: > This sucker should return 0. Insufficiently large buffer will be handled > by caller, TYVM, if you give that caller a chance to do so. Returning 1 > from ->show() is a bug in almost all cases, and definitely so in this one. > > Just in

Re: [PATCH -next 2/3] batman-adv: Use seq_overflow

2013-12-10 Thread Al Viro
On Tue, Dec 10, 2013 at 09:12:43PM -0800, Joe Perches wrote: > diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c > index 2449afa..dfa5d2d 100644 > --- a/net/batman-adv/gateway_client.c > +++ b/net/batman-adv/gateway_client.c > @@ -517,29 +517,28 @@ static int batadv_wr

Re: [PATCH -next 2/3] batman-adv: Use seq_overflow

2013-12-10 Thread Antonio Quartulli
On 11/12/13 06:12, Joe Perches wrote: > Convert the uses of the return of seq_printf to > instead check seq_overflow to determine if a buffer > overflow has occurred. > > This will eventually allow seq_printf & seq_puts to > be converted to a void return instead of the often > misused return that