mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Make static usermode helper binaries constant
There are a number of usermode helper binaries that are "hard coded" in the kernel today, so mark them as "const" to make it harder for someone to change where the variables point to. Cc: Benjamin Herrenschmidt <[email protected]> Cc: Thomas Sailer <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Johan Hovold <[email protected]> Cc: Alex Elder <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Cc: Jeff Layton <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
6d2c5d6c46
commit
377e7a27c0
7 changed files with 26 additions and 18 deletions
|
|
@ -98,6 +98,7 @@ static struct completion unload_sem;
|
|||
*/
|
||||
static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
|
||||
{
|
||||
static char const sbin_pnpbios[] = "/sbin/pnpbios";
|
||||
char *argv[3], **envp, *buf, *scratch;
|
||||
int i = 0, value;
|
||||
|
||||
|
|
@ -112,7 +113,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
|
|||
* integrated into the driver core and use the usual infrastructure
|
||||
* like sysfs and uevents
|
||||
*/
|
||||
argv[0] = "/sbin/pnpbios";
|
||||
argv[0] = (char *)sbin_pnpbios;
|
||||
argv[1] = "dock";
|
||||
argv[2] = NULL;
|
||||
|
||||
|
|
@ -139,7 +140,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
|
|||
info->location_id, info->serial, info->capabilities);
|
||||
envp[i] = NULL;
|
||||
|
||||
value = call_usermodehelper(argv [0], argv, envp, UMH_WAIT_EXEC);
|
||||
value = call_usermodehelper(sbin_pnpbios, argv, envp, UMH_WAIT_EXEC);
|
||||
kfree(buf);
|
||||
kfree(envp);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue