1. 14 12月, 2017 2 次提交
  2. 11 12月, 2017 1 次提交
  3. 30 11月, 2017 1 次提交
  4. 27 11月, 2017 1 次提交
    • M
      media: rc: fix lots of documentation warnings · f67f366c
      Mauro Carvalho Chehab 提交于
      Building the driver with gcc 7.2.1 and:
      	make ARCH=i386  CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y W=1 CHECK='' M=drivers/media
      
      now produces a lot of warnings:
      	drivers/media/rc/rc-main.c:278: warning: No description found for parameter 'new_keycode'
      	drivers/media/rc/rc-main.c:278: warning: Excess function parameter 'keycode' description in 'ir_update_mapping'
      	drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'ke'
      	drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'old_keycode'
      	drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'scancode' description in 'ir_setkeycode'
      	drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'keycode' description in 'ir_setkeycode'
      	drivers/media/rc/rc-main.c:433: warning: Excess function parameter 'to' description in 'ir_setkeytable'
      	drivers/media/rc/rc-main.c:506: warning: No description found for parameter 'ke'
      	drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'scancode' description in 'ir_getkeycode'
      	drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'keycode' description in 'ir_getkeycode'
      	drivers/media/rc/rc-main.c:634: warning: No description found for parameter 't'
      	drivers/media/rc/rc-main.c:634: warning: Excess function parameter 'cookie' description in 'ir_timer_keyup'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      f67f366c
  5. 31 10月, 2017 1 次提交
  6. 05 10月, 2017 6 次提交
  7. 20 8月, 2017 6 次提交
  8. 14 6月, 2017 2 次提交
  9. 18 5月, 2017 1 次提交
  10. 24 3月, 2017 1 次提交
  11. 03 3月, 2017 2 次提交
  12. 31 1月, 2017 3 次提交
  13. 30 1月, 2017 5 次提交
  14. 19 11月, 2016 1 次提交
    • M
      [media] rc-main: clear rc_map.name in ir_free_table() · c183d358
      Max Kellermann 提交于
      rc_unregister_device() will first call ir_free_table(), and later
      device_del(); however, the latter causes a call to rc_dev_uevent(),
      which prints rc_map.name, which at this point has already bee freed.
      
      This fixes a use-after-free bug found with KASAN.
      
      As reported by Shuah:
      
       "I am seeing the following when I do rmmod on au0828
      
        BUG: KASAN: use-after-free in string+0x170/0x1f0 at addr ffff8801bd513000
        Read of size 1 by task rmmod/1831
        CPU: 1 PID: 1831 Comm: rmmod Tainted: G        W       4.9.0-rc5 #5
        Hardware name: Hewlett-Packard HP ProBook 6475b/180F, BIOS 68TTU Ver. F.04 08/03/2012
        ffff8801aea2f680 ffffffff81b37ad3 ffff8801fa403b80 ffff8801bd513000
        ffff8801aea2f6a8 ffffffff8156c301 ffff8801aea2f738 ffff8801bd513000
        ffff8801fa403b80 ffff8801aea2f728 ffffffff8156c59a ffff8801aea2f770
        Call Trace:
        dump_stack+0x67/0x94
        [<ffffffff8156c301>] kasan_object_err+0x21/0x70
        [<ffffffff8156c59a>] kasan_report_error+0x1fa/0x4d0
        [<ffffffffa116f05f>] ? au0828_exit+0x10/0x21 [au0828]
        [<ffffffff8156c8b3>] __asan_report_load1_noabort+0x43/0x50
        [<ffffffff81b58b20>] ? string+0x170/0x1f0
        [<ffffffff81b58b20>] string+0x170/0x1f0
        [<ffffffff81b621c4>] vsnprintf+0x374/0x1c50
        [<ffffffff81b61e50>] ? pointer+0xa80/0xa80
        [<ffffffff8156b676>] ? save_stack+0x46/0xd0
        [<ffffffff81566faa>] ? __kmalloc+0x14a/0x2a0
        [<ffffffff81b3d70a>] ? kobject_get_path+0x9a/0x200
        [<ffffffff81b408c2>] ? kobject_uevent_env+0x282/0xca0
        [<ffffffff81b412eb>] ? kobject_uevent+0xb/0x10
        [<ffffffff81f10104>] ? device_del+0x434/0x6d0
        [<ffffffffa0fea717>] ? rc_unregister_device+0x177/0x240 [rc_core]
        [<ffffffffa116eeb0>] ? au0828_rc_unregister+0x60/0xb0 [au0828]
      
       The problem is fixed with this patch on Linux 4.9-rc4"
      Signed-off-by: NMax Kellermann <max.kellermann@gmail.com>
      Tested-by: NShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      c183d358
  15. 18 11月, 2016 1 次提交
  16. 25 10月, 2016 1 次提交
  17. 21 10月, 2016 1 次提交
    • M
      [media] rc: don't break long lines · 25ec587c
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      25ec587c
  18. 22 9月, 2016 2 次提交
  19. 09 7月, 2016 1 次提交
    • H
      [media] rc-main: fix kernel oops after unloading keymap module · d54fc3bb
      Hans Verkuil 提交于
      When the rc_map table is created the char pointer of the name of the keymap
      is copied to the rc_map->name field. However, this pointer points to memory
      from the keymap module itself.
      
      Since these keymap modules are not refcounted, that means anyone can call
      rmmod to unload that module. Which is not a big deal because the contents of
      the map is all copied to rc_map, except for the keymap name.
      
      So after a keymap module is unloaded the name pointer has become stale. Unloading
      the rc-core module will now cause a kernel oops in rc_dev_uevent().
      
      The solution is to kstrdup the name so there are no more references to the
      keymap module remaining.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      d54fc3bb
  20. 22 6月, 2016 1 次提交