]> git.baikalelectronics.ru Git - kernel.git/commit
net: ppp_generic - fix regressions caused by IDR conversion
authorCyrill Gorcunov <gorcunov@openvz.org>
Tue, 13 Jan 2009 06:11:56 +0000 (22:11 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2009 06:11:56 +0000 (22:11 -0800)
commitc8901743f0bf430d93e5c34057024bc5314166a0
tree15d351fa12c73bf5d74ecb223d798604a63e52b0
parentc22c7ca80b11af4081d21d4f2cf3d725afc708c3
net: ppp_generic - fix regressions caused by IDR conversion

The commits:

a23801e9f780c0e65ae7a953773675fdf76d265a
("net: ppp_generic - use idr technique instead of cardmaps")

82f28572f2c3c71139705378a92e5b863e5e9335
("net: ppp_generic - use DEFINE_IDR for static initialization")

introduced usage of IDR functionality but broke userspace side.

Before this commits it was possible to allocate new ppp interface with
specified number. Now it fails with EINVAL.  Fix it by trying to
allocate interface with specified unit number and return EEXIST if
fail which allow pppd to ask us to allocate new unit number.

And fix messages on memory allocation fails - add details that it's
PPP module who is complaining.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp_generic.c