Skip to content

fbdev: Fix memory leak in option parsing

Thomas Zimmermann dri-devel linux-fbdev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest101 patches 10 repliesIn review
  2. v199 patches 11 repliesSuperseded

Changes in v2 from the cover letter

* use kstrdup()/kfree() for video strings (Geert, Timur)
* fix iterator docs (Randy)
* update iterator interface

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/101lib: Add option iteratorDocumentation/core-api/kernel-api.rst include/linux/cmdline.h lib/Makefile +1 more+155 -12 replies
2/101fbdev/68328fb: Remove trailing whitespacesdrivers/video/fbdev/68328fb.c+6 -60 replies
3/101fbdev/68328fb: Remove unused option stringdrivers/video/fbdev/68328fb.c+1 -110 replies
4/101fbdev/acornfb: Only init fb_info oncedrivers/video/fbdev/acornfb.c+1 -40 replies
5/101fbdev/acornfb: Parse option string with struct option_iterdrivers/video/fbdev/acornfb.c+9 -70 replies
6/101fbdev/amifb: Duplicate video-mode option stringdrivers/video/fbdev/amifb.c+6 -40 replies
7/101fbdev/amifb: Parse option string with struct option_iterdrivers/video/fbdev/amifb.c+7 -60 replies
8/101fbdev/arkfb: Duplicate video-mode option stringdrivers/video/fbdev/arkfb.c+6 -20 replies
9/101fbdev/atafb: Duplicate video-mode option stringdrivers/video/fbdev/atafb.c+4 -30 replies
10/101fbdev/atafb: Parse option string with struct option_iterdrivers/video/fbdev/atafb.c+8 -60 replies
11/101fbdev/aty: Duplicate video-mode option stringdrivers/video/fbdev/aty/aty128fb.c drivers/video/fbdev/aty/atyfb_base.c drivers/video/fbdev/aty/radeon_base.c+21 -50 replies
12/101fbdev/aty: Parse option string with struct option_iterdrivers/video/fbdev/aty/aty128fb.c drivers/video/fbdev/aty/atyfb_base.c drivers/video/fbdev/aty/radeon_base.c+24 -150 replies
13/101fbdev/au1100fb: Parse option string with struct option_iterdrivers/video/fbdev/au1100fb.c+9 -40 replies
14/101fbdev/au1200fb: Parse option string with struct option_iterdrivers/video/fbdev/au1200fb.c+8 -50 replies
15/101fbdev/cirrusfb: Duplicate video-mode option stringdrivers/video/fbdev/cirrusfb.c+9 -40 replies
16/101fbdev/cirrusfb: Parse option string with struct option_iterdrivers/video/fbdev/cirrusfb.c+8 -70 replies
17/101fbdev/controlfb: Remove trailing whitespacesdrivers/video/fbdev/controlfb.c+17 -170 replies
18/101fbdev/controlfb: Parse option string with struct option_iterdrivers/video/fbdev/controlfb.c+7 -40 replies
19/101fbdev/cyber2000fb: Parse option string with struct option_iterdrivers/video/fbdev/cyber2000fb.c+8 -70 replies
20/101fbdev/efifb: Parse option string with struct option_iterdrivers/video/fbdev/efifb.c+22 -200 replies
21/101fbdev/fm2fb: Parse option string with struct option_iterdrivers/video/fbdev/fm2fb.c+8 -40 replies
22/101fbdev/fsl-diu-fb: Duplicate video-mode option stringdrivers/video/fbdev/fsl-diu-fb.c+7 -20 replies
23/101fbdev/fsl-diu-fb: Parse option string with struct option_iterdrivers/video/fbdev/fsl-diu-fb.c+7 -60 replies
24/101fbdev/gbefb: Duplicate video-mode option stringdrivers/video/fbdev/gbefb.c+5 -40 replies
25/101fbdev/gbefb: Parse option string with struct option_iterdrivers/video/fbdev/gbefb.c+9 -50 replies
26/101fbdev/geode: Duplicate video-mode option stringdrivers/video/fbdev/geode/gxfb_core.c drivers/video/fbdev/geode/lxfb_core.c+12 -30 replies
27/101fbdev/geode: Parse option string with struct option_iterdrivers/video/fbdev/geode/gx1fb_core.c drivers/video/fbdev/geode/gxfb_core.c drivers/video/fbdev/geode/lxfb_core.c+21 -220 replies
28/101fbdev/grvga: Duplicate video-mode option stringdrivers/video/fbdev/grvga.c+1 -10 replies
29/101fbdev/grvga: Parse option string with struct option_iterdrivers/video/fbdev/grvga.c+8 -50 replies
30/101fbdev/gxt4500: Duplicate video-mode option stringdrivers/video/fbdev/gxt4500.c+12 -10 replies
31/101fbdev/hyperv_fb: Duplicate video-mode option stringdrivers/video/fbdev/hyperv_fb.c+13 -51 reply
32/101fbdev/i740fb: Duplicate video-mode option stringdrivers/video/fbdev/i740fb.c+7 -20 replies
33/101fbdev/i740fb: Parse option string with struct option_iterdrivers/video/fbdev/i740fb.c+8 -70 replies
34/101fbdev/i810: Duplicate video-mode option stringdrivers/video/fbdev/i810/i810_main.c+7 -20 replies
35/101fbdev/i810: Parse option string with struct option_iterdrivers/video/fbdev/i810/i810_main.c+10 -50 replies
36/101fbdev/imsttfb: Parse option string with struct option_iterdrivers/video/fbdev/imsttfb.c+9 -50 replies
37/101fbdev/intelfb: Duplicate video-mode option stringdrivers/video/fbdev/intelfb/intelfbdrv.c+7 -20 replies
38/101fbdev/intelfb: Parse option string with struct option_iterdrivers/video/fbdev/intelfb/intelfbdrv.c+8 -40 replies
39/101fbdev/imxfb: Duplicate video-mode option stringdrivers/video/fbdev/imxfb.c+4 -40 replies
40/101fbdev/imxfb: Parse option string with struct option_iterdrivers/video/fbdev/imxfb.c+8 -70 replies
41/101fbdev/kyrofb: Duplicate video-mode option stringdrivers/video/fbdev/kyro/fbdev.c+5 -10 replies
42/101fbdev/kyrofb: Parse option string with struct option_iterdrivers/video/fbdev/kyro/fbdev.c+7 -60 replies
43/101fbdev/macfb: Remove trailing whitespacesdrivers/video/fbdev/macfb.c+5 -50 replies
44/101fbdev/macfb: Parse option string with struct option_iterdrivers/video/fbdev/macfb.c+7 -70 replies
45/101fbdev/matroxfb: Parse option string with struct option_iterdrivers/video/fbdev/matrox/matroxfb_base.c+9 -80 replies
46/101fbdev/mx3fb: Duplicate video-mode option stringdrivers/video/fbdev/mx3fb.c+7 -20 replies
47/101fbdev/mx3fb: Parse option string with struct option_iterdrivers/video/fbdev/mx3fb.c+8 -60 replies
48/101fbdev/neofb: Duplicate video-mode option stringdrivers/video/fbdev/neofb.c+7 -20 replies
49/101fbdev/neofb: Parse option string with struct option_iterdrivers/video/fbdev/neofb.c+8 -70 replies
50/101fbdev/nvidiafb: Duplicate video-mode option stringdrivers/video/fbdev/nvidia/nvidia.c+7 -20 replies
51/101fbdev/nvidiafb: Parse option string with struct option_iterdrivers/video/fbdev/nvidia/nvidia.c+10 -50 replies
52/101fbdev/ocfb: Duplicate video-mode option stringdrivers/video/fbdev/ocfb.c+6 -10 replies
53/101fbdev/ocfb: Parse option string with struct option_iterdrivers/video/fbdev/ocfb.c+7 -70 replies
54/101fbdev/omapfb: Parse option string with struct option_iterdrivers/video/fbdev/omap/omapfb_main.c+8 -50 replies
55/101fbdev/platinumfb: Remove trailing whitespacesdrivers/video/fbdev/platinumfb.c+15 -150 replies
56/101fbdev/platinumfb: Parse option string with struct option_iterdrivers/video/fbdev/platinumfb.c+8 -40 replies
57/101fbdev/pm2fb: Duplicate video-mode option stringdrivers/video/fbdev/pm2fb.c+7 -20 replies
58/101fbdev/pm2fb: Parse option string with struct option_iterdrivers/video/fbdev/pm2fb.c+8 -60 replies
59/101fbdev/pm3fb: Duplicate video-mode option stringdrivers/video/fbdev/pm3fb.c+7 -20 replies
60/101fbdev/pm3fb: Parse option string with struct option_iterdrivers/video/fbdev/pm3fb.c+9 -70 replies
61/101fbdev/ps3fb: Duplicate video-mode option stringdrivers/video/fbdev/ps3fb.c+7 -22 replies
62/101fbdev/ps3fb: Parse option string with struct option_iterdrivers/video/fbdev/ps3fb.c+8 -90 replies
63/101fbdev/pvr2fb: Duplicate video-mode option stringdrivers/video/fbdev/pvr2fb.c+11 -20 replies
64/101fbdev/pvr2fb: Parse option string with struct option_iterdrivers/video/fbdev/pvr2fb.c+9 -80 replies
65/101fbdev/pxafb: Parse option string with struct option_iterdrivers/video/fbdev/pxafb.c+10 -60 replies
66/101fbdev/rivafb: Duplicate video-mode option stringdrivers/video/fbdev/riva/fbdev.c+7 -20 replies
67/101fbdev/rivafb: Parse option string with struct option_iterdrivers/video/fbdev/riva/fbdev.c+10 -50 replies
68/101fbdev/s3fb: Duplicate video-mode option stringdrivers/video/fbdev/s3fb.c+7 -20 replies
69/101fbdev/s3fb: Parse option string with struct option_iterdrivers/video/fbdev/s3fb.c+8 -80 replies
70/101fbdev/savagefb: Duplicate video-mode option stringdrivers/video/fbdev/savage/savagefb_driver.c+5 -10 replies
71/101fbdev/savagefb: Parse option string with struct option_iterdrivers/video/fbdev/savage/savagefb_driver.c+8 -40 replies
72/101fbdev/sisfb: Constify mode stringdrivers/video/fbdev/sis/sis_main.c+3 -30 replies
73/101fbdev/sisfb: Parse option string with struct option_iterdrivers/video/fbdev/sis/sis_main.c+8 -80 replies
74/101fbdev/skeletonfb: Parse option string with struct option_iterdrivers/video/fbdev/skeletonfb.c+13 -20 replies
75/101fbdev/sm712fb: Duplicate video-mode option stringdrivers/video/fbdev/sm712fb.c+8 -20 replies
76/101fbdev/sstfb: Duplicate video-mode option stringdrivers/video/fbdev/sstfb.c+7 -20 replies
77/101fbdev/sstfb: Parse option string with struct option_iterdrivers/video/fbdev/sstfb.c+8 -60 replies
78/101fbdev/stifb: Remove trailing whitespacesdrivers/video/fbdev/stifb.c+78 -780 replies
79/101fbdev/stifb: Constify option stringdrivers/video/fbdev/stifb.c+2 -20 replies
80/101fbdev/tdfxfb: Duplicate video-mode option stringdrivers/video/fbdev/tdfxfb.c+5 -10 replies
81/101fbdev/tdfxfb: Parse option string with struct option_iterdrivers/video/fbdev/tdfxfb.c+7 -60 replies
82/101fbdev/tgafb: Duplicate video-mode option stringdrivers/video/fbdev/tgafb.c+7 -30 replies
83/101fbdev/tgafb: Parse option string with struct option_iterdrivers/video/fbdev/tgafb.c+14 -140 replies
84/101fbdev/tmiofb: Remove unused option stringdrivers/video/fbdev/tmiofb.c+2 -220 replies
85/101fbdev/tridentfb: Duplicate video-mode option stringdrivers/video/fbdev/tridentfb.c+7 -20 replies
86/101fbdev/tridentfb: Parse option string with struct option_iterdrivers/video/fbdev/tridentfb.c+10 -60 replies
87/101fbdev/uvesafb: Duplicate video-mode option stringdrivers/video/fbdev/uvesafb.c+5 -10 replies
88/101fbdev/uvesafb: Parse option string with struct option_iterdrivers/video/fbdev/uvesafb.c+7 -60 replies
89/101fbdev/valkyriefb: Remove trailing whitespacesdrivers/video/fbdev/valkyriefb.c+7 -70 replies
90/101fbdev/valkyriefb: Parse option string with struct option_iterdrivers/video/fbdev/valkyriefb.c+9 -50 replies
91/101fbdev/vermilion: Remove unused option stringdrivers/video/fbdev/vermilion/vermilion.c+1 -60 replies
92/101fbdev/vesafb: Parse option string with struct option_iterdrivers/video/fbdev/vesafb.c+8 -60 replies
93/101fbdev/vfb: Remove trailing whitespacesdrivers/video/fbdev/vfb.c+5 -50 replies
94/101fbdev/vfb: Duplicate video-mode option stringdrivers/video/fbdev/vfb.c+7 -20 replies
95/101fbdev/vfb: Parse option string with struct option_iterdrivers/video/fbdev/vfb.c+8 -60 replies
96/101fbdev/viafb: Parse option string with struct option_iterdrivers/video/fbdev/via/viafbdev.c+8 -70 replies
97/101fbdev/vt8623fb: Duplicate video-mode option stringdrivers/video/fbdev/vt8623fb.c+6 -20 replies
98/101staging/sm750fb: Release g_settings in module-exit functiondrivers/staging/sm750fb/sm750.c+11 -130 replies
99/101staging/sm750fb: Duplicate video-mode option stringdrivers/staging/sm750fb/sm750.c+9 -20 replies
100/101staging/sm750fb: Parse option string with struct option_iterdrivers/staging/sm750fb/sm750.c+15 -130 replies
101/101fbdev: Constify option stringsdrivers/staging/sm750fb/sm750.c drivers/video/fbdev/acornfb.c drivers/video/fbdev/amifb.c +60 more+67 -780 replies

Reviews trailers per patch

1 of 101 patches has a Reviewed-by or Acked-by.

PatchMichael Kelley
1/101
2/101
3/101
4/101
5/101
6/101
7/101
8/101
9/101
10/101
11/101
12/101
13/101
14/101
15/101
16/101
17/101
18/101
19/101
20/101
21/101
22/101
23/101
24/101
25/101
26/101
27/101
28/101
29/101
30/101
31/101R-b
32/101
33/101
34/101
35/101
36/101
37/101
38/101
39/101
40/101
41/101
42/101
43/101
44/101
45/101
46/101
47/101
48/101
49/101
50/101
51/101
52/101
53/101
54/101
55/101
56/101
57/101
58/101
59/101
60/101
61/101
62/101
63/101
64/101
65/101
66/101
67/101
68/101
69/101
70/101
71/101
72/101
73/101
74/101
75/101
76/101
77/101
78/101
79/101
80/101
81/101
82/101
83/101
84/101
85/101
86/101
87/101
88/101
89/101
90/101
91/101
92/101
93/101
94/101
95/101
96/101
97/101
98/101
99/101
100/101
101/101

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 000/101] fbdev: Fix memory leak in option parsing

Introduce struct option_iter and helpers to parse command-line options with comma-separated key-value pairs. Then convert fbdev drivers to the new interface. Fixes a memory leak in the parsing of the video= option.

Before commit 73ce73c30ba9 ("fbdev: Transfer video= option strings to caller; clarify ownership"), a call to fb_get_options() either returned an internal string or a duplicated string; hence ownership of the string's memory buffer was not well defined, but depended on how users specified the video= option on the kernel command line. For global settings, the caller owned the returned memory and for per-driver settings, fb_get_options() owned the memory. As calling drivers were unable to detect the case, they had no option but to leak the the memory.

Commit 73ce73c30ba9 ("fbdev: Transfer video= option strings to caller; clarify ownership") changed semantics to caller-owned strings. Drivers still leaked the memory, but at least ownership was clear.

This patchset fixes the memory leak and changes string ownership back to fb_get_options(). Patch 1 introduces struct option_iter and a few helpers. The interface takes an option string, such as video=, in the common form value1,key2:value2,value3 etc and returns the individual comma-separated pairs. Various modules use this pattern, so the code is located under lib/.

Patches 2 to 100 go through fbdev drivers and convert them to the new interface. This often requires a number of cleanups. A driver would typically refer to the option string's video mode. Such strings are now copied to driver-allocated memory so that drivers don't refer directly to the option string's memory. The option iterator then replaces manual parsing loops based on strsep(","). All driver-allocated memory is released by removing the device or unloading the module.

Patch 101 finally changes the ownership of the option string to be internal to fb_get_option(); thereby fixing the memory leak. The option iterator holds its own copy of the string and is not affected by the change.

Most fbdev drivers only support to parse option strings if they are built-in. I assume that's because of the original fuzzy semantics of fb_get_options(). A later patchset could change the driver to respect video= settings in any configuration.

v2:
* use kstrdup()/kfree() for video strings (Geert, Timur)
* fix iterator docs (Randy)
* update iterator interface

Thomas Zimmermann (101):
lib: Add option iterator
fbdev/68328fb: Remove trailing whitespaces fbdev/68328fb: Remove unused option string fbdev/acornfb: Only init fb_info once
fbdev/acornfb: Parse option string with struct option_iter fbdev/amifb: Duplicate video-mode option string fbdev/amifb: Parse option string with struct option_iter fbdev/arkfb: Duplicate video-mode option string fbdev/atafb: Duplicate video-mode option string fbdev/atafb: Parse option string with struct option_iter fbdev/aty: Duplicate video-mode option string fbdev/aty: Parse option string with struct option_iter fbdev/au1100fb: Parse option string with struct option_iter fbdev/au1200fb: Parse option string with struct option_iter fbdev/cirrusfb: Duplicate video-mode option string fbdev/cirrusfb: Parse option string with struct option_iter fbdev/controlfb: Remove trailing whitespaces fbdev/controlfb: Parse option string with struct option_iter fbdev/cyber2000fb: Parse option string with struct option_iter fbdev/efifb: Parse option string with struct option_iter fbdev/fm2fb: Parse option string with struct option_iter fbdev/fsl-diu-fb: Duplicate video-mode option string fbdev/fsl-diu-fb: Parse option string with struct option_iter fbdev/gbefb: Duplicate video-mode option string fbdev/gbefb: Parse option string with struct option_iter fbdev/geode: Duplicate video-mode option string fbdev/geode: Parse option string with struct option_iter fbdev/grvga: Duplicate video-mode option string fbdev/grvga: Parse option string with struct option_iter fbdev/gxt4500: Duplicate video-mode option string fbdev/hyperv_fb: Duplicate video-mode option string fbdev/i740fb: Duplicate video-mode option string fbdev/i740fb: Parse option string with struct option_iter fbdev/i810: Duplicate video-mode option string fbdev/i810: Parse option string with struct option_iter fbdev/imsttfb: Parse option string with struct option_iter fbdev/intelfb: Duplicate video-mode option string fbdev/intelfb: Parse option string with struct option_iter fbdev/imxfb: Duplicate video-mode option string fbdev/imxfb: Parse option string with struct option_iter fbdev/kyrofb: Duplicate video-mode option string fbdev/kyrofb: Parse option string with struct option_iter fbdev/macfb: Remove trailing whitespaces fbdev/macfb: Parse option string with struct option_iter fbdev/matroxfb: Parse option string with struct option_iter fbdev/mx3fb: Duplicate video-mode option string fbdev/mx3fb: Parse option string with struct option_iter fbdev/neofb: Duplicate video-mode option string fbdev/neofb: Parse option string with struct option_iter fbdev/nvidiafb: Duplicate video-mode option string fbdev/nvidiafb: Parse option string with struct option_iter fbdev/ocfb: Duplicate video-mode option string fbdev/ocfb: Parse option string with struct option_iter fbdev/omapfb: Parse option string with struct option_iter fbdev/platinumfb: Remove trailing whitespaces fbdev/platinumfb: Parse option string with struct option_iter fbdev/pm2fb: Duplicate video-mode option string fbdev/pm2fb: Parse option string with struct option_iter fbdev/pm3fb: Duplicate video-mode option string fbdev/pm3fb: Parse option string with struct option_iter fbdev/ps3fb: Duplicate video-mode option string fbdev/ps3fb: Parse option string with struct option_iter fbdev/pvr2fb: Duplicate video-mode option string fbdev/pvr2fb: Parse option string with struct option_iter fbdev/pxafb: Parse option string with struct option_iter fbdev/rivafb: Duplicate video-mode option string fbdev/rivafb: Parse option string with struct option_iter fbdev/s3fb: Duplicate video-mode option string fbdev/s3fb: Parse option string with struct option_iter fbdev/savagefb: Duplicate video-mode option string fbdev/savagefb: Parse option string with struct option_iter fbdev/sisfb: Constify mode string
fbdev/sisfb: Parse option string with struct option_iter fbdev/skeletonfb: Parse option string with struct option_iter fbdev/sm712fb: Duplicate video-mode option string fbdev/sstfb: Duplicate video-mode option string fbdev/sstfb: Parse option string with struct option_iter fbdev/stifb: Remove trailing whitespaces fbdev/stifb: Constify option string
fbdev/tdfxfb: Duplicate video-mode option string fbdev/tdfxfb: Parse option string with struct option_iter fbdev/tgafb: Duplicate video-mode option string fbdev/tgafb: Parse option string with struct option_iter fbdev/tmiofb: Remove unused option string fbdev/tridentfb: Duplicate video-mode option string fbdev/tridentfb: Parse option string with struct option_iter fbdev/uvesafb: Duplicate video-mode option string fbdev/uvesafb: Parse option string with struct option_iter fbdev/valkyriefb: Remove trailing whitespaces fbdev/valkyriefb: Parse option string with struct option_iter fbdev/vermilion: Remove unused option string fbdev/vesafb: Parse option string with struct option_iter fbdev/vfb: Remove trailing whitespaces
fbdev/vfb: Duplicate video-mode option string fbdev/vfb: Parse option string with struct option_iter fbdev/viafb: Parse option string with struct option_iter fbdev/vt8623fb: Duplicate video-mode option string staging/sm750fb: Release g_settings in module-exit function staging/sm750fb: Duplicate video-mode option string staging/sm750fb: Parse option string with struct option_iter
fbdev: Constify option strings

 Documentation/core-api/kernel-api.rst        |   9 ++
 drivers/staging/sm750fb/sm750.c              |  63 ++++----
 drivers/video/fbdev/68328fb.c                |  24 +--
 drivers/video/fbdev/acornfb.c                |  23 ++-
 drivers/video/fbdev/amifb.c                  |  23 +--
 drivers/video/fbdev/arkfb.c                  |  10 +-
 drivers/video/fbdev/atafb.c                  |  21 +--
 drivers/video/fbdev/aty/aty128fb.c           |  22 ++-
 drivers/video/fbdev/aty/atyfb_base.c         |  23 ++-
 drivers/video/fbdev/aty/radeon_base.c        |  26 +--
 drivers/video/fbdev/au1100fb.c               |  13 +-
 drivers/video/fbdev/au1200fb.c               |  15 +-
 drivers/video/fbdev/cirrusfb.c               |  30 ++--
 drivers/video/fbdev/controlfb.c              |  47 +++---
 drivers/video/fbdev/core/fb_cmdline.c        |  13 +-
 drivers/video/fbdev/core/modedb.c            |   8 +-
 drivers/video/fbdev/cyber2000fb.c            |  17 +-
 drivers/video/fbdev/efifb.c                  |  44 ++---
 drivers/video/fbdev/ep93xx-fb.c              |   2 +-
 drivers/video/fbdev/fm2fb.c                  |  14 +-
 drivers/video/fbdev/fsl-diu-fb.c             |  24 +--
 drivers/video/fbdev/gbefb.c                  |  23 +--
 drivers/video/fbdev/geode/gx1fb_core.c       |  16 +-
 drivers/video/fbdev/geode/gxfb_core.c        |  23 +--
 drivers/video/fbdev/geode/lxfb_core.c        |  25 +--
 drivers/video/fbdev/grvga.c                  |  18 ++-
 drivers/video/fbdev/gxt4500.c                |  13 +-
 drivers/video/fbdev/hyperv_fb.c              |  18 ++-
 drivers/video/fbdev/i740fb.c                 |  26 +--
 drivers/video/fbdev/i810/i810_main.c         |  26 ++-
 drivers/video/fbdev/imsttfb.c                |  16 +-
 drivers/video/fbdev/imxfb.c                  |  21 +--
 drivers/video/fbdev/intelfb/intelfbdrv.c     |  23 ++-
 drivers/video/fbdev/kyro/fbdev.c             |  21 ++-
 drivers/video/fbdev/macfb.c                  |  26 +--
 drivers/video/fbdev/matrox/matroxfb_base.c   |  19 +--
 drivers/video/fbdev/mx3fb.c                  |  23 ++-
 drivers/video/fbdev/neofb.c                  |  26 +--
 drivers/video/fbdev/nvidia/nvidia.c          |  26 ++-
 drivers/video/fbdev/ocfb.c                   |  21 ++-
 drivers/video/fbdev/omap/omapfb_main.c       |  15 +-
 drivers/video/fbdev/platinumfb.c             |  44 ++---
 drivers/video/fbdev/pm2fb.c                  |  25 +--
 drivers/video/fbdev/pm3fb.c                  |  27 ++--
 drivers/video/fbdev/ps3fb.c                  |  28 ++--
 drivers/video/fbdev/pvr2fb.c                 |  32 ++--
 drivers/video/fbdev/pxafb.c                  |  18 ++-
 drivers/video/fbdev/riva/fbdev.c             |  26 ++-
 drivers/video/fbdev/s3fb.c                   |  27 ++--
 drivers/video/fbdev/savage/savagefb_driver.c |  20 ++-
 drivers/video/fbdev/sis/sis_main.c           |  24 +--
 drivers/video/fbdev/skeletonfb.c             |  17 +-
 drivers/video/fbdev/sm712fb.c                |  12 +-
 drivers/video/fbdev/sstfb.c                  |  25 +--
 drivers/video/fbdev/stifb.c                  | 162 +++++++++----------
 drivers/video/fbdev/tdfxfb.c                 |  21 ++-
 drivers/video/fbdev/tgafb.c                  |  30 ++--
 drivers/video/fbdev/tmiofb.c                 |  24 +--
 drivers/video/fbdev/tridentfb.c              |  27 ++--
 drivers/video/fbdev/uvesafb.c                |  21 ++-
 drivers/video/fbdev/valkyriefb.c             |  30 ++--
 drivers/video/fbdev/vermilion/vermilion.c    |   7 +-
 drivers/video/fbdev/vesafb.c                 |  16 +-
 drivers/video/fbdev/vfb.c                    |  35 ++--
 drivers/video/fbdev/via/viafbdev.c           |  15 +-
 drivers/video/fbdev/vt8623fb.c               |  11 +-
 include/linux/cmdline.h                      |  36 +++++
 include/linux/fb.h                           |   2 +-
 lib/Makefile                                 |   2 +-
 lib/cmdline_iter.c                           | 109 +++++++++++++
 70 files changed, 1087 insertions(+), 682 deletions(-)
 create mode 100644 include/linux/cmdline.h
 create mode 100644 lib/cmdline_iter.c
Signature · 1 line
2.39.2