usage of kill_pid and family

From: Pavan Savoy
Date: Mon Aug 30 2010 - 12:46:02 EST


Hi,

I use kill_pid in one of our drivers to signal a user-space daemon to
perform a particular action (open-UART for instance), I recently ran
into problems with permissions as to when a user with stranger UID
started open up a device, which internally calls the kill_pid in that
context, could not send the signal and returned with "permission
denied".

I started using kill_pid_info_as_uid and sent signals as UID 0 to
solve the problem, it did solve the problem, but is this the right
approach?

Also why is not suggested to use kill_pid and family to communicate
with user-space? (namespace issues??- what do they mean?)

Note:
I get the PID of the process which receives signal from one of the
sysfs entries created by driver, but filled up by the daemon...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/