rpms/kernel/F-10 linux-2.6-parport-quickfix-the-proc-registration-bug.patch, NONE, 1.1 TODO, 1.52, 1.53 kernel.spec, 1.1378, 1.1379
Chuck Ebbert
cebbert at fedoraproject.org
Fri Jun 5 06:22:53 UTC 2009
- Previous message (by thread): rpms/kernel/devel patch-2.6.30-rc8-git1.bz2.sign, NONE, 1.1 .cvsignore, 1.1076, 1.1077 kernel.spec, 1.1559, 1.1560 sources, 1.1034, 1.1035 upstream, 1.948, 1.949
- Next message (by thread): rpms/python-simplejson/F-11 .cvsignore, 1.14, 1.15 python-simplejson.spec, 1.25, 1.26 sources, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12634
Modified Files:
TODO kernel.spec
Added Files:
linux-2.6-parport-quickfix-the-proc-registration-bug.patch
Log Message:
Fix the parport sysctl registration bug (F11#503773)
linux-2.6-parport-quickfix-the-proc-registration-bug.patch
linux-2.6-parport-quickfix-the-proc-registration-bug.patch:
--- NEW FILE linux-2.6-parport-quickfix-the-proc-registration-bug.patch ---
From: Alan Cox <alan at etchedpixels.co.uk>
Date: Tue, 2 Jun 2009 15:58:10 +0000 (+0100)
Subject: parport: quickfix the proc registration bug
X-Git-Tag: v2.6.30-rc8~2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=05ad709d04799125ed85dd816fdb558258102172
parport: quickfix the proc registration bug
Ideally we should have a directory of drivers and a link to the 'active'
driver. For now just show the first device which is effectively the existing
semantics without a warning.
This is an update on the original buggy patch that I then forgot to
resubmit. Confusingly it was proposed by Red Hat, written by Etched Pixels
fixed and submitted by Intel ...
Resolves-Bug: http://bugzilla.kernel.org/show_bug.cgi?id=9749
Signed-off-by: Alan Cox <alan at linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 0ebca45..dffa5d4 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -614,7 +614,10 @@ parport_register_device(struct parport *port, const char *name,
* pardevice fields. -arca
*/
port->ops->init_state(tmp, tmp->state);
- parport_device_proc_register(tmp);
+ if (!test_and_set_bit(PARPORT_DEVPROC_REGISTERED, &port->devflags)) {
+ port->proc_device = tmp;
+ parport_device_proc_register(tmp);
+ }
return tmp;
out_free_all:
@@ -646,10 +649,14 @@ void parport_unregister_device(struct pardevice *dev)
}
#endif
- parport_device_proc_unregister(dev);
-
port = dev->port->physport;
+ if (port->proc_device == dev) {
+ port->proc_device = NULL;
+ clear_bit(PARPORT_DEVPROC_REGISTERED, &port->devflags);
+ parport_device_proc_unregister(dev);
+ }
+
if (port->cad == dev) {
printk(KERN_DEBUG "%s: %s forgot to release port\n",
port->name, dev->name);
diff --git a/include/linux/parport.h b/include/linux/parport.h
index e1f83c5..38a423e 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -324,6 +324,10 @@ struct parport {
int spintime;
atomic_t ref_count;
+ unsigned long devflags;
+#define PARPORT_DEVPROC_REGISTERED 0
+ struct pardevice *proc_device; /* Currently register proc device */
+
struct list_head full_list;
struct parport *slaves[3];
};
Index: TODO
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/TODO,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- TODO 4 Jun 2009 05:33:31 -0000 1.52
+++ TODO 5 Jun 2009 06:22:21 -0000 1.53
@@ -154,8 +154,8 @@ F-10 fixes that need to go into F-11
Disabled upstream now except when xrun detection is on
Copy fix for bz 481753: linux-2.6-ptrace-fix-possible-zombie-leak.patch
Copy keyboard forced release quirks: linux-2.6-input-atkbd-forced-release.patch
- Fix VIA padlock driver autoload:
+ Copy fix for VIA padlock driver autoload:
linux-2.6-crypto-aes-padlock-fix-autoload-2.patch
linux-2.6-crypto-aes-padlock-fix-autoload.patch
- IBM ehea network adapter fix: linux-2.6-netdev-ehea-fix-circular-locking.patch
-
+ Copy IBM ehea network adapter fix: linux-2.6-netdev-ehea-fix-circular-locking.patch
+ Copy parport proc registration bugfix : linux-2.6-parport-quickfix-the-proc-registration-bug.patch
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1378
retrieving revision 1.1379
diff -u -p -r1.1378 -r1.1379
--- kernel.spec 4 Jun 2009 05:33:31 -0000 1.1378
+++ kernel.spec 5 Jun 2009 06:22:21 -0000 1.1379
@@ -758,6 +758,8 @@ Patch9700: keys-handle-no-fallback-keyri
# Backport of upstream memory reduction for ftrace
Patch10000: linux-2.6-ftrace-memory-reduction.patch
+Patch11000: linux-2.6-parport-quickfix-the-proc-registration-bug.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1417,6 +1419,9 @@ ApplyPatch keys-handle-no-fallback-keyri
# Reduce the memory usage of ftrace if you don't use it.
ApplyPatch linux-2.6-ftrace-memory-reduction.patch
+# finally fix the proc registration bug (F11#503773 and others)
+ApplyPatch linux-2.6-parport-quickfix-the-proc-registration-bug.patch
+
# ======= END OF PATCH APPLICATIONS =============================
%endif
@@ -1993,6 +1998,10 @@ fi
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Fri Jun 05 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.4-79
+- Fix the parport sysctl registration bug (F11#503773)
+ linux-2.6-parport-quickfix-the-proc-registration-bug.patch
+
* Thu Jun 04 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.4-78
- Add linux-2.6-netdev-ehea-fix-circular-locking.patch
(fixes F-11 bug #498854)
- Previous message (by thread): rpms/kernel/devel patch-2.6.30-rc8-git1.bz2.sign, NONE, 1.1 .cvsignore, 1.1076, 1.1077 kernel.spec, 1.1559, 1.1560 sources, 1.1034, 1.1035 upstream, 1.948, 1.949
- Next message (by thread): rpms/python-simplejson/F-11 .cvsignore, 1.14, 1.15 python-simplejson.spec, 1.25, 1.26 sources, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list