[v4l-dvb-maintainer] [stable] [patch 00/50] -stable review

[v4l-dvb-maintainer] [stable] [patch 00/50] -stable review

Post by Michael Kr » Fri, 23 Feb 2007 06:10:09



It is merged into Linus' tree now:

http://www.yqcomputer.com/ ;a=commitdiff;h=b61901024776b25ce7b8edc31bb1757c7382a88e

... The only difference is that the changeset in Linus' tree also changes some
whitespace.

Please merge this into 2.6.18.y, 2.6.19.y and 2.6.20.y

Adrian, this should also apply against 2.6.16.y

Thank you,

Michael Krufky

---

dvbdev: fix illegal re-usage of fileoperations struct

From: Marcel Siegert < XXXX@XXXXX.COM >

Arjan van de Ven < XXXX@XXXXX.COM > reported an illegal re-usage of the
fileoperations struct
if more than one dvb device(e.g. frontend) is present. this patch fixes this issue.
it allocates a new fileoperations struct each time a device is registered and
copies the default
template fileops.

Signed-off-by: Marcel Siegert < XXXX@XXXXX.COM >
Signed-off-by: Michael Krufky < XXXX@XXXXX.COM >

---
linux/drivers/media/dvb/dvb-core/dvbdev.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

--- linux/drivers/media/dvb/dvb-core/dvbdev.c.orig
+++ linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -211,6 +211,8 @@
const struct dvb_device *template, void *priv, int type)
{
struct dvb_device *dvbdev;
+ struct file_operations *dvbdevfops;
+
int id;

if (mutex_lock_interruptible(&dvbdev_register_lock))
@@ -230,12 +232,22 @@
return -ENOMEM;
}

+ dvbdevfops = kzalloc(sizeof(struct file_operations), GFP_KERNEL);
+
+ if (!dvbdevfops) {
+ kfree (dvbdev);
+ mutex_unlock(&dvbdev_register_lock);
+ return -ENOMEM;
+ }
+
memcpy(dvbdev, template, sizeof(struct dvb_device));
dvbdev->type = type;
dvbdev->id = id;
dvbdev->adapter = adap;
dvbdev->priv = priv;
+ dvbdev->fops = dvbdevfops;

+ memcpy(dvbdev->fops, template->fops, sizeof(struct file_operations));
dvbdev->fops->owner = adap->module;

list_add_tail (&dvbdev->list_head, &adap->device_list);
@@ -263,6 +275,7 @@
dvbdev->type, dvbdev->id)));

list_del (&dvbdev->list_head);
+ kfree (dvbdev->fops);
kfree (dvbdev);
}
EXPORT_SYMBOL(dvb_unregister_device);



--
Michael Krufky

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[v4l-dvb-maintainer] [stable] [patch 00/50] -stable review

Post by Adrian Bun » Tue, 27 Feb 2007 23:40:12


Thanks, applied.


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/