Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-05-2005, 02:46 PM   #1
Registered: Oct 2003
Posts: 64

Rep: Reputation: 15
Fix for K3B issue (kernel patch)

I found the following after searching for a while to fix a problem I was having with k3b. Can someone take a look at this and tell me what you think?


I use K3B with growisofs to burn DVDs. After boot I can burn a DVD as a
normal user. But only the first one. When I want to burn another one,
K3B complains that it is unable to prevent media removal. Then only root
can burn DVDs.
The bug is in the kernel in the function verify_command.
When a process opens the DVD recorder with O_RDONLY and issues a command
which is marked safe_for_write, this function is supposed to just return
-EPERM and do nothing more. However, there is a bug that causes the
command to be marked as CMD_WARNED. From now on no non-privileged
process is able to issue this command even if it correctly opens the
device with O_RDWR - because the command is no longer marked as
A patch is attached.


["verify_command.patch" (text/x-patch)]

--- linux-2.6.11-mm1/drivers/block/scsi_ioctl.c.orig 2005-01-17 20:42:40.000000000 +0100
+++ linux-2.6.11-mm1/drivers/block/scsi_ioctl.c 2005-01-17 20:43:14.000000000 +0100
@@ -197,9 +197,7 @@ static int verify_command(struct file *f
if (type & CMD_WRITE_SAFE) {
if (file->f_mode & FMODE_WRITE)
return 0;
- }
- if (!(type & CMD_WARNED)) {
+ } else if (!(type & CMD_WARNED)) {
cmd_type[cmd[0]] = CMD_WARNED;
printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
Old 03-06-2005, 11:54 PM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
That seams reasonable to me so long as it's not valid to have CMD_WRITE_SAFE and CMD_WARNED states simultaneously. Unfortunately I don' t know enough about that particular functionality to know if that makes sense or not.
Old 03-07-2005, 04:06 PM   #3
Registered: Oct 2003
Posts: 64

Original Poster
Rep: Reputation: 15
I'm having the exact problem described by the post I found. I just wanted to see if anyone else had the same problem or if anyone knew if this would bugger my kernel.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b problem and patch?? wrat Linux - Newbie 2 02-18-2005 05:32 AM
k3b and SuSE 9.1 patch mikedeatworld Linux - Software 1 08-30-2004 03:07 PM
K3B on OpenBSD 3.5 patch branch predrag *BSD 5 08-29-2004 06:40 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 02:21 PM
CD-RW install/setup/scsi issue with k3b/xcdroast and kernel compile probs Texicle Slackware 17 01-09-2004 02:50 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration