aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.c')
0 files changed, 0 insertions, 0 deletions
torvalds@ppc970.osdl.org> 2005-04-16 18:20:36 -0400 committer Linus Torvalds <torvalds@ppc970.osdl.org> 2005-04-16 18:20:36 -0400 Linux-2.6.12-rc2' href='/cgit/cgit.cgi/litmus-rt-odroidx.git/commit/fs/open.c?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2'>1da177e4c3f
e81e3f4dca6

4a30131e7db

1da177e4c3f
939a9421eb5
1da177e4c3f






4a30131e7db
cc4e69dee4a



1da177e4c3f
7b82dc0e64e
939a9421eb5


7b82dc0e64e
1b1dcc1b57a
939a9421eb5
1b1dcc1b57a
939a9421eb5
1da177e4c3f

2d8f30380ab
1da177e4c3f
2d8f30380ab

1da177e4c3f





2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f









2d8f30380ab
1da177e4c3f


256984a8388
9ac9b8474c3

1da177e4c3f

c82e42da8a6
9ac9b8474c3
1da177e4c3f
9700382c3c9
1da177e4c3f
9ac9b8474c3
1da177e4c3f
9700382c3c9



8737c9305bd
1da177e4c3f
9700382c3c9
1da177e4c3f

be6d3e56a6b
ea0d3ab239f
907f4554e25
2d8f30380ab
1da177e4c3f
9700382c3c9

9ac9b8474c3
2d8f30380ab
1da177e4c3f
2d8f30380ab
1da177e4c3f



4fd8da8d624
1da177e4c3f
4fd8da8d624
1da177e4c3f

b01ec0ef63e
1da177e4c3f

















0f7fc9e4d03
1da177e4c3f















ea0d3ab239f
be6d3e56a6b
6e656be8999
1da177e4c3f





bdc480e3bef
1da177e4c3f
0a489cb3b6a
385910f2b27
54a01510413
0a489cb3b6a
1da177e4c3f



6673e0c3fbe
1da177e4c3f


6673e0c3fbe






1da177e4c3f
6673e0c3fbe
1da177e4c3f
0a489cb3b6a
385910f2b27
54a01510413
0a489cb3b6a
1da177e4c3f
6673e0c3fbe





1da177e4c3f
6673e0c3fbe
1da177e4c3f
3e63cbb1efc

97ac73506c0
3e63cbb1efc

97ac73506c0

3e63cbb1efc
97ac73506c0

79124f18b33





3e63cbb1efc
97ac73506c0
97ac73506c0
3e63cbb1efc
1ca551c6caa







97ac73506c0





3e63cbb1efc
97ac73506c0
97ac73506c0
3e63cbb1efc
97ac73506c0
97ac73506c0




3e63cbb1efc
97ac73506c0
97ac73506c0

3e63cbb1efc
97ac73506c0
2fe17c10758
3e63cbb1efc
97ac73506c0
2fe17c10758
3e63cbb1efc













97ac73506c0
3e63cbb1efc
6673e0c3fbe






97ac73506c0
1da177e4c3f




6559eed8ca7
1da177e4c3f
d84f4f992cb

2d8f30380ab
256984a8388
1da177e4c3f




d84f4f992cb


1da177e4c3f
d84f4f992cb

1da177e4c3f
086f7316f0d
1cdcbec1a33
d84f4f992cb

086f7316f0d
d84f4f992cb

086f7316f0d
1da177e4c3f
d84f4f992cb

2d8f30380ab
6902d925d56


2d8f30380ab
256984a8388

30524472c2f




2d8f30380ab
30524472c2f


256984a8388
6902d925d56
256984a8388
6902d925d56
2f676cbc0d6









2d8f30380ab
6902d925d56
1da177e4c3f
6902d925d56
2d8f30380ab
6902d925d56
d84f4f992cb

1da177e4c3f


ca013e945b1
5590ff0d552



3cdad42884b
1da177e4c3f
2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f


9cfcac810e8
1da177e4c3f


2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f



3cdad42884b
1da177e4c3f

1da177e4c3f
1da177e4c3f






ac748a09fc8
1da177e4c3f




9cfcac810e8
1da177e4c3f
ac748a09fc8
1da177e4c3f





3480b25743c
1da177e4c3f
2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f


9cfcac810e8
1da177e4c3f





8b8efb44033


1da177e4c3f
2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f



a26eab2400f
1da177e4c3f










0f7fc9e4d03
1da177e4c3f

5a190ae6976
73241ccca0f
96029c4e09c
2af482a7edf
1da177e4c3f
fe542cf59bf
89eda068370

fe542cf59bf
1da177e4c3f




fe542cf59bf
1b1dcc1b57a
2af482a7edf
1da177e4c3f





6559eed8ca7
1da177e4c3f
2d8f30380ab

1da177e4c3f


2d8f30380ab
1da177e4c3f

2d8f30380ab
1da177e4c3f
2d8f30380ab
2af482a7edf
1da177e4c3f
fe542cf59bf
89eda068370

fe542cf59bf
1da177e4c3f



2d8f30380ab
fe542cf59bf
1b1dcc1b57a
2d8f30380ab
1da177e4c3f
2d8f30380ab
1da177e4c3f



a26eab2400f
5590ff0d552



fe542cf59bf
1da177e4c3f
fe542cf59bf
1da177e4c3f


1da177e4c3f









b53767719b6

1b1dcc1b57a
fe542cf59bf


1b1dcc1b57a
beb29e058c3
1da177e4c3f


ca013e945b1
1da177e4c3f
2d8f30380ab
1da177e4c3f

2d8f30380ab
6902d925d56

2d8f30380ab
2af482a7edf

fe542cf59bf
2d8f30380ab
2af482a7edf
2d8f30380ab
6902d925d56
1da177e4c3f


6559eed8ca7

5590ff0d552
2d8f30380ab
5590ff0d552
65cfc672236
5590ff0d552
65cfc672236
5590ff0d552

65cfc672236



6902d925d56

2d8f30380ab
2af482a7edf

fe542cf59bf
2d8f30380ab
2af482a7edf
2d8f30380ab
5590ff0d552



ca013e945b1
1da177e4c3f
2d8f30380ab
1da177e4c3f

2d8f30380ab
6902d925d56

2d8f30380ab
2af482a7edf

fe542cf59bf
2d8f30380ab
2af482a7edf
2d8f30380ab
6902d925d56
1da177e4c3f


ca013e945b1
1da177e4c3f


6902d925d56
1da177e4c3f

6902d925d56


96029c4e09c
2af482a7edf

0f7fc9e4d03
5a190ae6976
fe542cf59bf
2af482a7edf

6902d925d56

1da177e4c3f


4a3fd211ccf




























a1a5b3d93ca
482928d59db
745ca2475a6

1da177e4c3f
1abf0c718f1
1da177e4c3f


5300990c037
a1a5b3d93ca
1abf0c718f1



1da177e4c3f

4a3fd211ccf
1da177e4c3f

ad775f5a8fa

1da177e4c3f


0f7fc9e4d03

1da177e4c3f
ee2ffa0dfdd
1da177e4c3f
1abf0c718f1






745ca2475a6
788e7dd4c22


834f2a4a155



1da177e4c3f


890275b5eb7

834f2a4a155
1da177e4c3f





ceffc078528

70688e4dd16
1da177e4c3f








4a3fd211ccf
1da177e4c3f
ad775f5a8fa







4a3fd211ccf
ad775f5a8fa
4a3fd211ccf
ee2ffa0dfdd
0f7fc9e4d03

1da177e4c3f

1da177e4c3f




834f2a4a155









9a56c213929



834f2a4a155







745ca2475a6

834f2a4a155



4ac9137858e
834f2a4a155
745ca2475a6
834f2a4a155















482928d59db
834f2a4a155
745ca2475a6
834f2a4a155



2dab5974416

834f2a4a155
d893f1bc2a9

482928d59db
745ca2475a6
d893f1bc2a9
834f2a4a155


6fdcc216228



745ca2475a6

a1a5b3d93ca



e0e817392b9

c212f9aaf91

322ee5b36ea
a1a5b3d93ca

6fdcc216228


a1a5b3d93ca
6fdcc216228
a1a5b3d93ca
482928d59db

a1a5b3d93ca
1da177e4c3f

b01ec0ef63e
1da177e4c3f
badf16621c1

0c9e63fd38a

1da177e4c3f

fc9b52cd8f5
1da177e4c3f









5590ff0d552
1da177e4c3f










fc9b52cd8f5
1da177e4c3f

badf16621c1
1da177e4c3f
badf16621c1
ab2af1f5005

1da177e4c3f




47c805dc2d2




















1abf0c718f1









47c805dc2d2
1abf0c718f1
47c805dc2d2











1abf0c718f1

47c805dc2d2































73d049a40fc













5590ff0d552
1da177e4c3f
47c805dc2d2

e922efc342d

1da177e4c3f
1da177e4c3f
f23513e8d96
1da177e4c3f
47c805dc2d2
fed2fc18a45



2a12a9d7814
fed2fc18a45

1da177e4c3f
1da177e4c3f


1da177e4c3f
e922efc342d
ca013e945b1
e922efc342d
385910f2b27

e922efc342d


385910f2b27

54a01510413
385910f2b27
e922efc342d
1da177e4c3f
6559eed8ca7

5590ff0d552
385910f2b27

5590ff0d552


385910f2b27

54a01510413
385910f2b27
5590ff0d552
5590ff0d552
1da177e4c3f





002c8976ee5
1da177e4c3f











45778ca819a
1da177e4c3f


45778ca819a
1da177e4c3f

45778ca819a
75e1fcc0b18
1da177e4c3f
1abf0c718f1



1da177e4c3f










ca013e945b1
1da177e4c3f


badf16621c1
ee731f4f788
1da177e4c3f

badf16621c1

1da177e4c3f
badf16621c1
1da177e4c3f

ab2af1f5005
badf16621c1
1da177e4c3f

ee731f4f788









1da177e4c3f




1da177e4c3f





ca013e945b1
1da177e4c3f

2cb5998b5f0
1da177e4c3f













a9c62a18a29
1da177e4c3f






06b1e104b7e


1da177e4c3f







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161







                                            
                       
                          
                           
                         


                              
                             
                             

                           
                        
                       

                        
                              

                           
                           
                        
                         
                            
                      
                          
 

                     

                                                                              
 
                






                                                                                
                                                   



                                               
 
                                              


                                                      
 
                                              
                                               
                                                
                   

 
                                                                       
 

                            





                                                       
                                           

                         
                                     









                                                                            
                                         


                                  
                                                   

                                            

                       
                             
                                            
 
                                        
                  
                                            
 



                                                                           
                                             
                  
                                       

                                                           
                   
                                                      
                   
                                                                  
 

                                
                       
                                 
             
                        



                     
                                                                  
 
                                             

 
                                                                       

















                                                                
                                     















                                                                         
                                                              
                   
                                                                                 





                     
                                                                   
 
                                                   
                                            
                                               
                   



                                                                 
                                                                   


                                             






                                                                   
 
                                                           
 
                                                   
                                            
                                               
                   
 





                                                           
      
                                
 

                                                                        
 

                                                           

                                   
                               

                                                   





                                                                 
                                   
 
                                          
                              







                                                              





                                                                        
                           
 
                                    
                               
 




                                                                         
                               
 

                                                                               
                              
 
                                   
                                   
 
                                                              













                                                                      
 
 






                                                                            
 




                                                                     
                                                                              
 

                                    
                         
                            




                                                                     


                                        
 

                                                  
 
                                                
                                                                            

                                                                
                    

                                                             
         
 

                                                 
                                                                


                         
                                     

                                                          




                                                                           
                                                     


                                              
                                                         
                                                          
                                                                    
                                      









                                                              
                                        
                             
 
                 
                        
    

                                


                   
                                                                 



                                                       
                                                     
 
                         

                  
                                               


                         
                                                                             


                                  
                                       

             
                        



                     
                                         

                          
                            






                         
                                             




                                    
                                                              
                   
                                                       





                     
                                                      
 
                         

                  
                                               


                         
                                                                             





                                     


                                            
 
                                        

                  
                        



                     
                                                       










                               
                                     

                                
                                  
 
                                        
                
                              
                                    

                                                                
                                




                                                                             
           
                                      
                                         





                   
                                                                                
 

                            


                              
                                                                  

                         
                                     
 
                                         
                  
                                  
                                    

                                                                 
                                



                                                                             
                                                      
           
                                      
                                 
             
                        



                     
                                                                   



                                                      
                                                                   
 
                                                    


                              









                                              

                                                                         
                                    


                                                               
                                      
 


                     
                                                                                
 
                         

                  
                                           

                         
                                         

                                 
                                                 
                                 
            
                        
    


                     

                                                                               
 
                         
                            
                         
 
                                                                 

                         



                                                                        

                         
                                         

                                 
                                                 
                                 
            
                        



                     
                                                                                 
 
                         

                  
                                            

                         
                                         

                                 
                                                 
                                 
            
                        
    


                     
                                                                    


                           
                               

                        


                         
                                          

                              
                                     
                                  
                                                         

                                         

                   


                     




























                                                               
                                                                              
                                                       

                                                                                   
 
                                                            


                            
                                                          
                                                           



                                          

                                      
                                                            

                                          

                                                 


                                        

                                  
                     
                                         
 






                                               
                                              


                                 



                                       


                                         

                                                                   
 





                                                                        

                                                         
                                                           








                                             
                                      
                                        







                                                         
                                            
                 
         
                            

                                

                    




                              









                                                                            



                                                                               







                                                                                 

                                                 



                                         
                                                                                
                                                                  
                                                         















                                                           
                                                    
 
                                                 



                                                   

                                    
                                                             

                                          
                                                                         
                                                 
         


                    



                                                                             

                                                                                



                       

                             

                                                           
 

                             


                             
                                      
         
 

                                                         
 

                           
                                                                        
 

                                                   

                                    

 
                                   









                                                    
                                          










                                                                         
                                                   

                                                    
                            
                                     
                                   

                                              




                                       




















                                                                              









                                                                 
 
                              











                                                                         

                                                      































                                                                     













                                                                        
                                                                           
 

                                                        

                                      
 
                           
                                                
                              
                                                                             



                                                  
                                                 

                                                  
                 


                             
 
 
                                                                           
 

                 


                                     

                                                           
                                                          
                   
 
 

                                                                            
 

                 


                                     

                                                      
                                                               
                   
 
 





                                                          
                                                                











                                                                      
                       


                                                                 
                         

         
                                            
                                                     
 



                                                   










                                                                   
                                        


                                                    
                            
                   

                                     

                                   
                                
                           

                                
                                              
                                       

                                       









                                                                              




                                       





                                                                    
                        

                                          
                                   













                                                                               
                                  






                                                      


                                                                         







                                                                    
/*
 *  linux/fs/open.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 */

#include <linux/string.h>
#include <linux/mm.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/fsnotify.h>
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/namei.h>
#include <linux/backing-dev.h>
#include <linux/capability.h>
#include <linux/securebits.h>
#include <linux/security.h>
#include <linux/mount.h>
#include <linux/fcntl.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <linux/fs.h>
#include <linux/personality.h>
#include <linux/pagemap.h>
#include <linux/syscalls.h>
#include <linux/rcupdate.h>
#include <linux/audit.h>
#include <linux/falloc.h>
#include <linux/fs_struct.h>
#include <linux/ima.h>
#include <linux/dnotify.h>

#include "internal.h"

int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
	struct file *filp)
{
	int ret;
	struct iattr newattrs;

	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
	if (length < 0)
		return -EINVAL;

	newattrs.ia_size = length;
	newattrs.ia_valid = ATTR_SIZE | time_attrs;
	if (filp) {
		newattrs.ia_file = filp;
		newattrs.ia_valid |= ATTR_FILE;
	}

	/* Remove suid/sgid on truncate too */
	ret = should_remove_suid(dentry);
	if (ret)
		newattrs.ia_valid |= ret | ATTR_FORCE;

	mutex_lock(&dentry->d_inode->i_mutex);
	ret = notify_change(dentry, &newattrs);
	mutex_unlock(&dentry->d_inode->i_mutex);
	return ret;
}

static long do_sys_truncate(const char __user *pathname, loff_t length)
{
	struct path path;
	struct inode *inode;
	int error;

	error = -EINVAL;
	if (length < 0)	/* sorry, but loff_t says... */
		goto out;

	error = user_path(pathname, &path);
	if (error)
		goto out;
	inode = path.dentry->d_inode;

	/* For directories it's -EISDIR, for other non-regulars - -EINVAL */
	error = -EISDIR;
	if (S_ISDIR(inode->i_mode))
		goto dput_and_out;

	error = -EINVAL;
	if (!S_ISREG(inode->i_mode))
		goto dput_and_out;

	error = mnt_want_write(path.mnt);
	if (error)
		goto dput_and_out;

	error = inode_permission(inode, MAY_WRITE);
	if (error)
		goto mnt_drop_write_and_out;

	error = -EPERM;
	if (IS_APPEND(inode))
		goto mnt_drop_write_and_out;

	error = get_write_access(inode);
	if (error)
		goto mnt_drop_write_and_out;

	/*
	 * Make sure that there are no leases.  get_write_access() protects
	 * against the truncate racing with a lease-granting setlease().
	 */
	error = break_lease(inode, O_WRONLY);
	if (error)
		goto put_write_and_out;

	error = locks_verify_truncate(inode, NULL, length);
	if (!error)
		error = security_path_truncate(&path);
	if (!error)
		error = do_truncate(path.dentry, length, 0, NULL);