[Xenomai-git] Gilles Chanteperdrix : drivers/rtnet: fix SIOCGIFNAME ioctl
Module: xenomai-3 Branch: stable-3.0.x Commit: 92df665f42c4fbadcabfc324c6d3e9b20e1d2a66 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=92df665f42c4fbadcabfc324c6d3e9b20e1d2a66 Author: Gilles Chanteperdrix Date: Sun Nov 1 19:13:39 2015 +0100 drivers/rtnet: fix SIOCGIFNAME ioctl Add missing call to rtdev_dereference. --- kernel/drivers/net/stack/socket.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/drivers/net/stack/socket.c b/kernel/drivers/net/stack/socket.c index 0c028ab..64a2a2e 100644 --- a/kernel/drivers/net/stack/socket.c +++ b/kernel/drivers/net/stack/socket.c @@ -273,7 +273,8 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void *arg) if (rtdev == NULL) return -ENODEV; strlcpy(ifr->ifr_name, rtdev->name, IFNAMSIZ); -return 0; + ret = 0; + goto out; } rtdev = rtdev_get_by_name(ifr->ifr_name); @@ -312,6 +313,7 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void *arg) break; } + out: rtdev_dereference(rtdev); return ret; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Gilles Chanteperdrix : drivers/rtnet: fix SIOCGIFNAME ioctl
Module: xenomai-3 Branch: next Commit: ee1e6b32a0a7adfb694d1297daf447173b92237c URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ee1e6b32a0a7adfb694d1297daf447173b92237c Author: Gilles Chanteperdrix Date: Sun Nov 1 19:13:39 2015 +0100 drivers/rtnet: fix SIOCGIFNAME ioctl Add missing call to rtdev_dereference. --- kernel/drivers/net/stack/socket.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/drivers/net/stack/socket.c b/kernel/drivers/net/stack/socket.c index 0c028ab..64a2a2e 100644 --- a/kernel/drivers/net/stack/socket.c +++ b/kernel/drivers/net/stack/socket.c @@ -273,7 +273,8 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void *arg) if (rtdev == NULL) return -ENODEV; strlcpy(ifr->ifr_name, rtdev->name, IFNAMSIZ); -return 0; + ret = 0; + goto out; } rtdev = rtdev_get_by_name(ifr->ifr_name); @@ -312,6 +313,7 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void *arg) break; } + out: rtdev_dereference(rtdev); return ret; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git