Re: [PATCH] net: sched: cls: fix a potential missing-check bug

2018-05-04 Thread David Miller
From: Wenwen Wang Date: Fri, 4 May 2018 02:05:05 -0500 > Given that gen_tunnel() may return a value larger than 255 based on > data, the new value of f->res.classid should be re-checked. gen_tunnel() may not ever return a value larger than 255. data->tgenerator is a u8 and therefore can never

[PATCH] net: sched: cls: fix a potential missing-check bug

2018-05-04 Thread Wenwen Wang
In rsvp_change(), the value of f->res.classid is checked to be no more than 255. Otherwise, the execution will goto errout. This is enforced by a if-statement check. However, in the following execution, f->res.classid is assigned with a new value returned from gen_tunnel(), and the new value is onl