Hi,

looking through printer.c in preparation for shifting devfs
support to usbcore I noticed that printer advertises a device
through devfs before it can be opened.
As devfs, or more precisely devfsd can be used to trigger actions
this matters and is wrong.

        Regards
                Oliver

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


[EMAIL PROTECTED], 2002-05-02 01:02:04+02:00, [EMAIL PROTECTED]
  - fix tiny race with devfs




diff -Nru a/drivers/usb/class/printer.c b/drivers/usb/class/printer.c
--- a/drivers/usb/class/printer.c       Thu May  2 01:03:48 2002
+++ b/drivers/usb/class/printer.c       Thu May  2 01:03:48 2002
@@ -871,6 +871,9 @@
        usblp_check_status(usblp, 0);
 #endif
 
+       /* add a table entry so the device works when advertised */
+       usblp_table[usblp->minor] = usblp;
+
        /* If we have devfs, create with perms=660. */
        sprintf(name, "lp%d", usblp->minor);
        usblp->devfs = devfs_register(usb_devfs_handle, name,
@@ -886,7 +889,7 @@
                usblp->current_protocol, usblp->dev->descriptor.idVendor,
                usblp->dev->descriptor.idProduct);
 
-       return usblp_table[usblp->minor] = usblp;
+       return usblp;
 
 abort:
        if (usblp) {

===================================================================


This BitKeeper patch contains the following changesets:
1.507
## Wrapped with gzip_uu ##


begin 664 bkpatch11047
M'XL(`%1TT#P``ZV4;6O;,!#'7T>?XJ`O!NULZ\%V[(R4;.WHQ@8K'7VUC2';
M<BSB2$%2D@;\X2<[7;I`Z1XZXP=)ISO][^Z'3^#6"C,9Z59NA$$G\$Y;YZ="
M:27"1B]%*]7Z+M1F[HTW6GMCU"]'>X^H6`3."&&C2FQJB_RF:^[*!KS-3D8D
M9(<5MUN)R>CF[=7MQ]<W"$VG<-%P-1>?A8/I%!6+6;46;;@PFC?]>=W!W%&,
M"2$TP2Q)2=+1C+&X(RDN*C^LZ#BOBS1'%=_(*BAF*UX6HFU#Y3V/8E"<8()9
MS'#<X33.*+H$$B9X#)A&.(DP!4PFF$YP?-:_,>R3G#U6#C@C$&#T!IXO_`*5
M$$`M[\!)M0/#2P%;Z1K8U_0#C+,D0=</]4+!7UX(88[1^2-:*]-G:*.U+:*5
MD<H)$Y8/NF.<D[1C-*9Y5]0<9SG+QS&O,2OKIZIS%+=LN;7'T8=64-8_78S[
M5O1`/.'T."+/4(_F1LQG^U"E7OY>L,<&IS3U#61QDI&!'1H?HT,FE/T).C$$
MY#^BL^0+`79M!.B54*`5\)X=.7#4MK#59@'<@M6]R8)T+ZQW!/`ED-;G**I?
M@'OI]P$OG=3*@C-R/A\V%+M['GM';NX/='J([B'=M_$3!&8[W)ZZZZ<Z^@\0
MO\_&#!@:1:?`J\HGZ7C1"A#*F5TOVC7BD+<796';^'+PRDMPTOH<3B,T\E+:
MU??!\\LP#LZ74FGS#:8PS%^AK^@RRW(@_L#A,S+"K8WZ:3[\TLI&E`N[7D[3
/NJK'69&B'W=IX%)0!0``
`
end


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to