On 01/27/2015 08:12 PM, Oliver Hartkopp wrote: > When changing flags in the CAN drivers ctrlmode the provided new content has to > be checked whether the bits are allowed to be changed. The bits that are to be > changed are given as a bitfield in cm->mask. Therefore checking against > cm->flags is wrong as the content can hold any kind of values. > > The iproute2 tool sets the bits in cm->mask and cm->flags depending on the > detected command line options. To be robust against bogus user space > applications additionally sanitize the provided flags with the provided mask. > > (Backport of upstream commit 9b1087aa5e86448fe6ad40a58964e35f3ba423d5 for > Linux 3.2 .. Linux 3.14) Zefan Li is taking care of v3.4 Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |