Re: [PATCH] [media] Fix more regressions in some dib0700 based devices

2015-05-15 Thread Thomas Reitmayr
Hi Laura,
a similar patch (including one more missing initialization) was
submitted days ago and already sent to linux-stable, see
https://www.mail-archive.com/linux-media@vger.kernel.org/msg87882.html
and
http://article.gmane.org/gmane.linux.kernel.stable/135755
Best regards,
-Thomas


Am Freitag, den 15.05.2015, 10:42 -0700 schrieb Laura Abbott:
 Several more devices need need to have size_of_priv set, otherwise
 we oops:
 
  DVB: registering new adapter (Hauppauge Nova-TD Stick/Elgato Eye-TV 
 Diversity)
  BUG: unable to handle kernel NULL pointer dereference at 0080
  IP: [a0669141] dib7000p_attach+0x11/0xa0 [dib7000p]
  PGD 0 
  Oops: 0002 [#1] SMP 
  Modules linked in: dib7000p dvb_usb_dib0700(+) dib7000m dib0090 dib0070
  dib3000mc dibx000_common dvb_usb dvb_core rc_core bnep bluetooth rfkill
  ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat
  ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat
  nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle 
 ip6table_security
  ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4
  nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle 
 iptable_security
  iptable_raw snd_hda_codec_analog snd_hda_codec_generic joydev coretemp kvm
  snd_hda_intel iTCO_wdt gpio_ich iTCO_vendor_support ppdev snd_hda_controller
  dell_wmi sparse_keymap snd_hda_codec snd_hwdep snd_seq snd_seq_device dcdbas
  hid_logitech_hidpp snd_pcm serio_raw lpc_ich mfd_core i2c_i801
  snd_timer snd parport_pc soundcore mei_me tpm_tis parport tpm wmi mei shpchp
  acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc hid_logitech_dj i915
  e1000e i2c_algo_bit video drm_kms_helper drm ptp pps_core ata_generic
  pata_acpi
  CPU: 0 PID: 23460 Comm: systemd-udevd Not tainted 3.19.5-200.fc21.x86_64 #1
  Hardware name: Dell Inc. OptiPlex 760 /0R230R, BIOS A05 
 08/17/2009
  task: 880026e29360 ti: 880030b64000 task.ti: 880030b64000
  RIP: 0010:[a0669141]  [a0669141] 
 dib7000p_attach+0x11/0xa0 [dib7000p]
  RSP: 0018:880030b679f8  EFLAGS: 00010202
  RAX: 0010 RBX: 880047b71278 RCX: 0001
  RDX:  RSI: a06707d8 RDI: 0010
  RBP: 880030b679f8 R08: 81119fe0 R09: 00017840
  R10: 810b07e4 R11: 0246 R12: 
  R13: 0010 R14: 880047b71308 R15: 880047b71398
  FS:  7f005f380880() GS:88007c80() knlGS:
  CS:  0010 DS:  ES:  CR0: 8005003b
  CR2: 0080 CR3: 4e38d000 CR4: 000407f0
  Stack:
  880030b67a28 a06430fb 880047b71278 880047b71880
  880047b71278  880030b67a68 a0626872
  880047b7  880047b71280 880047b7
  Call Trace:
  [a06430fb] stk7700d_frontend_attach+0x3b/0x200 [dvb_usb_dib0700]
  [a0626872] dvb_usb_adapter_frontend_init+0xe2/0x1a0 [dvb_usb]
  [a0625ab7] dvb_usb_device_init+0x517/0x6f0 [dvb_usb]
  [a063f40e] dib0700_probe+0x6e/0x100 [dvb_usb_dib0700]
  [817731e6] ? mutex_lock+0x16/0x40
  [815598fb] usb_probe_interface+0x1bb/0x300
  [814c9e13] driver_probe_device+0xa3/0x400
  [814ca24b] __driver_attach+0x9b/0xa0
  [814ca1b0] ? __device_attach+0x40/0x40
  [814c7ad3] bus_for_each_dev+0x73/0xc0
  [814c987e] driver_attach+0x1e/0x20
  [814c9430] bus_add_driver+0x180/0x250
  [814caa44] driver_register+0x64/0xf0
  [81557ff2] usb_register_driver+0x82/0x160
  [a0663000] ? 0xa0663000
  [a066301e] dib0700_driver_init+0x1e/0x1000 [dvb_usb_dib0700]
  [81002148] do_one_initcall+0xd8/0x210
  [811fbb59] ? kmem_cache_alloc_trace+0x1a9/0x230
  [8111f053] ? load_module+0x2203/0x2800
  [8111f08b] load_module+0x223b/0x2800
  [8111a810] ? store_uevent+0x70/0x70
  [8111f71d] SyS_init_module+0xcd/0x120
  [817752c9] system_call_fastpath+0x12/0x17
  Code: 8b 87 18 03 00 00 55 48 89 e5 48 05 68 16 00 00 5d c3 0f 1f 84 00 00 
 00 00 00 66 66 66 66 90 55 48 85 ff 48 89 f8 48 89 e5 74 7f 48 c7 47 70 b0 
 a9 66 a0 48 c7 47 68 40 9a 66 a0 48 c7 47 30 90 
  RIP  [a0669141] dib7000p_attach+0x11/0xa0 [dib7000p]
  RSP 880030b679f8
  CR2: 0080
  ---[ end trace 288814f44b010d3e ]---
 
 Set it properly.
 
 Signed-off-by: Laura Abbott labb...@fedoraproject.org
 ---
  drivers/media/usb/dvb-usb/dib0700_devices.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c 
 b/drivers/media/usb/dvb-usb/dib0700_devices.c
 index d7d55a2..8030670 100644
 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c
 +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
 @@ -3944,6 +3944,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
  
   

Re: [PATCH] media: Fix regression in some more dib0700 based devices.

2015-05-02 Thread Thomas Reitmayr
Hi,
as indicated by the Fixes: commit, this problem exists from kernel
version 3.17 up until now. Please consider forwarding the fix to
linux-stable if it looks ok to you.
Best regards,
-Thomas


Am Samstag, den 02.05.2015, 01:18 +0200 schrieb Thomas Reitmayr:
 Fix an oops during device initialization by correctly setting size_of_priv
 instead of leaving it 0.
 The regression was introduced by 8abe4a0a3f6d4217b16a ([media] dib7000:
 export just one symbol) and only fixed for one type of dib0700 based
 devices in 9e334c75642b6e5bfb95 ([media] Fix regression in some dib0700
 based devices).
 
 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92301
 
 Fixes: 8abe4a0a3f6d4217b16a ([media] dib7000: export just one symbol)
 Signed-off-by: Thomas Reitmayr treitm...@devbase.at
 ---
  drivers/media/usb/dvb-usb/dib0700_devices.c | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c 
 b/drivers/media/usb/dvb-usb/dib0700_devices.c
 index 90cee38..e87ce83 100644
 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c
 +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
 @@ -3944,6 +3944,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
  
   DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
   }},
 + .size_of_priv = sizeof(struct
 + dib0700_adapter_state),
   }, {
   .num_frontends = 1,
   .fe = {{
 @@ -3956,6 +3958,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
  
   DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
   }},
 + .size_of_priv = sizeof(struct
 + dib0700_adapter_state),
   }
   },
  
 @@ -4009,6 +4013,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
  
   DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
   }},
 + .size_of_priv = sizeof(struct
 + dib0700_adapter_state),
   },
   },
  

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media: Fix regression in some more dib0700 based devices.

2015-05-01 Thread Thomas Reitmayr
Fix an oops during device initialization by correctly setting size_of_priv
instead of leaving it 0.
The regression was introduced by 8abe4a0a3f6d4217b16a ([media] dib7000:
export just one symbol) and only fixed for one type of dib0700 based
devices in 9e334c75642b6e5bfb95 ([media] Fix regression in some dib0700
based devices).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92301

Fixes: 8abe4a0a3f6d4217b16a ([media] dib7000: export just one symbol)
Signed-off-by: Thomas Reitmayr treitm...@devbase.at
---
 drivers/media/usb/dvb-usb/dib0700_devices.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c 
b/drivers/media/usb/dvb-usb/dib0700_devices.c
index 90cee38..e87ce83 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -3944,6 +3944,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
 
DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
}},
+   .size_of_priv = sizeof(struct
+   dib0700_adapter_state),
}, {
.num_frontends = 1,
.fe = {{
@@ -3956,6 +3958,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
 
DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
}},
+   .size_of_priv = sizeof(struct
+   dib0700_adapter_state),
}
},
 
@@ -4009,6 +4013,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
 
DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
}},
+   .size_of_priv = sizeof(struct
+   dib0700_adapter_state),
},
},
 
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html