cxgb3: Use CAP_SYS_RAWIO for firmware

Otherwise theoretically at least

CAP_NET_ADMIN
Reload new firmware
Wait..
Firmware patches kernel

So it should be CAY_SYS_RAWIO - not that I suspect this is in fact a
credible attack vector!

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Alan Cox and committed by Jeff Garzik 1b3aa7af 01935d7d

+2 -2
+2 -2
drivers/net/cxgb3/cxgb3_main.c
··· 1894 1894 u8 *fw_data; 1895 1895 struct ch_mem_range t; 1896 1896 1897 - if (!capable(CAP_NET_ADMIN)) 1897 + if (!capable(CAP_SYS_RAWIO)) 1898 1898 return -EPERM; 1899 1899 if (copy_from_user(&t, useraddr, sizeof(t))) 1900 1900 return -EFAULT; 1901 - 1901 + /* Check t.len sanity ? */ 1902 1902 fw_data = kmalloc(t.len, GFP_KERNEL); 1903 1903 if (!fw_data) 1904 1904 return -ENOMEM;