[mythtv-commits] Ticket #11977: HDHomerun library calls spurious ioctl when discovering devices

MythTV noreply at mythtv.org
Wed Dec 11 22:07:52 UTC 2013


#11977: HDHomerun library calls spurious ioctl when discovering devices
-------------------------------------+-------------------------------------
     Reporter:  david.madsen@…       |      Owner:  silicondust
         Type:  Bug Report -         |     Status:  new
  General                            |  Milestone:  unknown
     Priority:  minor                |    Version:  0.27-fixes
    Component:  MythTV - HDHomeRun   |   Keywords:  hdhomerun
     Severity:  low                  |  CAP_SYS_MODULE
Ticket locked:  0                    |
-------------------------------------+-------------------------------------
 After updating my kernel several months ago I started receiving lots of
 these kernel messages.

 [9032269.637115] Loading kernel module for a network device with
 CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev- instead.
 [9032335.163087] Loading kernel module for a network device with
 CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev- instead.
 [9032345.164423] Loading kernel module for a network device with
 CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev- instead.

 After several months of on and off debugging I've finally traced where
 they are coming from.

 When the HDHR library attempts to discover the IP address of the device,
 it is utilizing ioctls to enumerate the network interfaces on the host.
 Inside the function hdhomerun_discover_sock_detect_internal() it calls
 SIOCGIFCONF and loops over the result to retrieve the status of the
 various network interfaces.

 The loop control "(ptr <= end)" however is running past the end of the
 data returned from SIOCGIFCONF and makes an extra call to SIOCGIFADDR
 without valid data.  This results in this error (from an strace):

 ioctl(4, SIOCGIFFLAGS, {ifr_name="", ???}) = -1 ENODEV (No such device)

 The error return is handled gracefully, but this ioctl call also triggers
 the kernel to attempt to load modules to add a network device named "",
 which then results in the previously mentioned warnings in the kernel log.

 I've modified the while loop to "ptr < end" without any issues other than
 resolving the kernel log spam.

 This is really an upstream issue in the HDHR libraries themselves, but
 since MythTV uses a local version of them I've filed it here.  I'm not
 sure where specifically to file the issue for the Silicondust guys to
 address so if anyone knows where to do that please pass the info along.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11977>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list