dgnc_ports_state_show exposes ports status which help an adversary to plan an attack. Thus, the function is removed. Signed-off-by: Salah Triki <salah.triki@xxxxxxx> --- drivers/staging/dgnc/dgnc_sysfs.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 44db870..d616065 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -145,26 +145,6 @@ static ssize_t dgnc_serial_number_show(struct device *p, } static DEVICE_ATTR(serial_number, S_IRUSR, dgnc_serial_number_show, NULL); - -static ssize_t dgnc_ports_state_show(struct device *p, - struct device_attribute *attr, char *buf) -{ - struct dgnc_board *bd; - int count = 0; - int i = 0; - - DGNC_VERIFY_BOARD(p, bd); - - for (i = 0; i < bd->nasync; i++) { - count += snprintf(buf + count, PAGE_SIZE - count, - "%d %s\n", bd->channels[i]->ch_portnum, - bd->channels[i]->ch_open_count ? "Open" : "Closed"); - } - return count; -} -static DEVICE_ATTR(ports_state, S_IRUSR, dgnc_ports_state_show, NULL); - - static ssize_t dgnc_ports_baud_show(struct device *p, struct device_attribute *attr, char *buf) { -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel